From 548f129e5da9855ca5bdf2f2cfec33c565a54562 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 4 Feb 2012 19:06:53 +0000 Subject: use integer division git-svn-id: http://arthurdejong.org/svn/python-stdnum/python-stdnum@97 9dea7c4f-944c-4273-ac1a-574ede026edc --- stdnum/iso7064/mod_37_36.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stdnum/iso7064/mod_37_36.py') diff --git a/stdnum/iso7064/mod_37_36.py b/stdnum/iso7064/mod_37_36.py index fd08393..42ed591 100644 --- a/stdnum/iso7064/mod_37_36.py +++ b/stdnum/iso7064/mod_37_36.py @@ -43,7 +43,7 @@ True def checksum(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): """Calculate the checksum.""" modulus = len(alphabet) - check = modulus / 2 + check = modulus // 2 for n in number: check = (((check or modulus) * 2) % (modulus + 1) + alphabet.index(n)) % modulus return check -- cgit v1.2.3