We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9c14b6b + 0607503 commit a59f932Copy full SHA for a59f932
1 file changed
barcode/ean.py
@@ -143,7 +143,7 @@ def calculate_checksum(self):
143
sum_ = lambda x, y: int(x) + int(y)
144
evensum = reduce(sum_, self.ean[::2])
145
oddsum = reduce(sum_, self.ean[1::2])
146
- return 10 - ((evensum * 3 + oddsum) % 10)
+ return (10 - ((evensum * 3 + oddsum) % 10)) % 10
147
148
def build(self):
149
"""Builds the barcode pattern from `self.ean`.
0 commit comments