python-stdnum commit: r97 - python-stdnum/stdnum/iso7064
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
python-stdnum commit: r97 - python-stdnum/stdnum/iso7064
- From: Commits of the python-stdnum project <python-stdnum-commits [at] lists.arthurdejong.org>
- To: python-stdnum-commits [at] lists.arthurdejong.org
- Reply-to: python-stdnum-users [at] lists.arthurdejong.org
- Subject: python-stdnum commit: r97 - python-stdnum/stdnum/iso7064
- Date: Sat, 4 Feb 2012 20:06:54 +0100 (CET)
Author: arthur
Date: Sat Feb 4 20:06:53 2012
New Revision: 97
URL: http://arthurdejong.org/viewvc/python-stdnum?revision=97&view=revision
Log:
use integer division
Modified:
python-stdnum/stdnum/iso7064/mod_37_36.py
Modified: python-stdnum/stdnum/iso7064/mod_37_36.py
==============================================================================
--- python-stdnum/stdnum/iso7064/mod_37_36.py Thu Feb 2 22:12:52 2012
(r96)
+++ python-stdnum/stdnum/iso7064/mod_37_36.py Sat Feb 4 20:06:53 2012
(r97)
@@ -43,7 +43,7 @@
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
--
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits/
- python-stdnum commit: r97 - python-stdnum/stdnum/iso7064,
Commits of the python-stdnum project