MCPcopy Create free account
hub / github.com/WhyNotHugo/python-barcode / __init__

Method __init__

barcode/ean.py:153–158  ·  view source on GitHub ↗
(self, jan, *args, **kwargs)

Source from the content-addressed store, hash-verified

151 valid_country_codes = list(range(450, 460)) + list(range(490, 500))
152
153 def __init__(self, jan, *args, **kwargs) -> None:
154 if int(jan[:3]) not in self.valid_country_codes:
155 raise WrongCountryCodeError(
156 "Country code isn't between 450-460 or 490-500."
157 )
158 super().__init__(jan, *args, **kwargs)
159
160
161class EuropeanArticleNumber8(EuropeanArticleNumber13):

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 1

Tested by

no test coverage detected