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.
1 parent a5eec52 commit 7b33d96Copy full SHA for 7b33d96
1 file changed
barcode/ean.py
@@ -62,7 +62,7 @@ def calculate_checksum(self):
62
:returns: The checksum for `self.ean`.
63
:rtype: Integer
64
"""
65
- def sum_(x, y): return lambda x, y: int(x) + int(y)
+ def sum_(x, y): return int(x) + int(y)
66
evensum = reduce(sum_, self.ean[::2])
67
oddsum = reduce(sum_, self.ean[1::2])
68
return (10 - ((evensum + oddsum * 3) % 10)) % 10
@@ -143,7 +143,7 @@ def calculate_checksum(self):
143
144
145
146
147
148
149
return (10 - ((evensum * 3 + oddsum) % 10)) % 10
0 commit comments