diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2012-02-26 12:10:38 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2012-02-26 12:10:38 +0100 |
commit | 902a6569bf90aa37a185a2e099b913b39b6db3f7 (patch) | |
tree | c9894909466a10c906d851902319d152ce6048db /stdnum/iso7064/mod_37_36.py | |
parent | 907e41082fe4d05556d402dc30376fce9f32d344 (diff) |
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
Diffstat (limited to 'stdnum/iso7064/mod_37_36.py')
-rw-r--r-- | stdnum/iso7064/mod_37_36.py | 8 |
1 files changed, 5 insertions, 3 deletions
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: |