lists.arthurdejong.org
RSS feed

python-stdnum commit: r67 - python-stdnum/stdnum

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum commit: r67 - python-stdnum/stdnum



Author: arthur
Date: Wed Mar  2 20:30:01 2011
New Revision: 67
URL: http://arthurdejong.org/viewvc/python-stdnum?view=rev&revision=67

Log:
Python 2.5 compatibility improvement

Modified:
   python-stdnum/stdnum/verhoeff.py

Modified: python-stdnum/stdnum/verhoeff.py
==============================================================================
--- python-stdnum/stdnum/verhoeff.py    Sun Feb  6 16:23:44 2011        (r66)
+++ python-stdnum/stdnum/verhoeff.py    Wed Mar  2 20:30:01 2011        (r67)
@@ -38,16 +38,16 @@
 # Verhoeff algorithm.
 
 _multiplication_table = (
-    ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ),
-    ( 1, 2, 3, 4, 0, 6, 7, 8, 9, 5 ),
-    ( 2, 3, 4, 0, 1, 7, 8, 9, 5, 6 ),
-    ( 3, 4, 0, 1, 2, 8, 9, 5, 6, 7 ),
-    ( 4, 0, 1, 2, 3, 9, 5, 6, 7, 8 ),
-    ( 5, 9, 8, 7, 6, 0, 4, 3, 2, 1 ),
-    ( 6, 5, 9, 8, 7, 1, 0, 4, 3, 2 ),
-    ( 7, 6, 5, 9, 8, 2, 1, 0, 4, 3 ),
-    ( 8, 7, 6, 5, 9, 3, 2, 1, 0, 4 ),
-    ( 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 ) )
+    [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
+    [ 1, 2, 3, 4, 0, 6, 7, 8, 9, 5 ],
+    [ 2, 3, 4, 0, 1, 7, 8, 9, 5, 6 ],
+    [ 3, 4, 0, 1, 2, 8, 9, 5, 6, 7 ],
+    [ 4, 0, 1, 2, 3, 9, 5, 6, 7, 8 ],
+    [ 5, 9, 8, 7, 6, 0, 4, 3, 2, 1 ],
+    [ 6, 5, 9, 8, 7, 1, 0, 4, 3, 2 ],
+    [ 7, 6, 5, 9, 8, 2, 1, 0, 4, 3 ],
+    [ 8, 7, 6, 5, 9, 3, 2, 1, 0, 4 ],
+    [ 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 ] )
 
 _permutation_table = (
     ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ),
-- 
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits