From 902a6569bf90aa37a185a2e099b913b39b6db3f7 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sun, 26 Feb 2012 11:10:38 +0000 Subject: ensure that the module docstrings are in a somewhat more usable format git-svn-id: http://arthurdejong.org/svn/python-stdnum/python-stdnum@165 9dea7c4f-944c-4273-ac1a-574ede026edc --- stdnum/iso7064/mod_37_36.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (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 42ed591..04644a4 100644 --- a/stdnum/iso7064/mod_37_36.py +++ b/stdnum/iso7064/mod_37_36.py @@ -17,8 +17,10 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 USA -"""Module for calculation and verifying the checksum of a number -using the ISO 7064 Mod 37, 36 algorithm. +"""The ISO 7064 Mod 37, 36 algorithm. + +The Mod 37, 36 algorithm uses an alphanumeric check digit and the number +itself may also contain letters. Validation can be done with is_valid(). A valid number can be made by calculating the check digit and appending it. @@ -41,7 +43,7 @@ True def checksum(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'): - """Calculate the checksum.""" + """Calculate the checksum. A valid number should have a checksum of 1.""" modulus = len(alphabet) check = modulus // 2 for n in number: -- cgit v1.2.3