(self, isbn, writer=None, no_checksum=False, guardbar=False)
| 43 | name = "ISBN-13" |
| 44 | |
| 45 | def __init__(self, isbn, writer=None, no_checksum=False, guardbar=False) -> None: |
| 46 | isbn = isbn.replace("-", "") |
| 47 | self.isbn13 = isbn |
| 48 | if isbn[:3] not in ("978", "979"): |
| 49 | raise WrongCountryCodeError("ISBN must start with 978 or 979.") |
| 50 | if isbn[:3] == "979" and isbn[3:4] not in ("1", "8"): |
| 51 | raise BarcodeError("ISBN must start with 97910 or 97911.") |
| 52 | super().__init__(isbn, writer, no_checksum, guardbar) |
| 53 | |
| 54 | |
| 55 | class InternationalStandardBookNumber10(InternationalStandardBookNumber13): |
no test coverage detected