lists.arthurdejong.org
RSS feed

python-stdnum commit: r38 - in python-stdnum: stdnum stdnum/iso7064 tests

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

python-stdnum commit: r38 - in python-stdnum: stdnum stdnum/iso7064 tests



Author: arthur
Date: Sun Aug 29 21:27:59 2010
New Revision: 38
URL: http://arthurdejong.org/viewvc/python-stdnum?view=rev&revision=38

Log:
spelling check

Modified:
   python-stdnum/stdnum/bsn.py
   python-stdnum/stdnum/isan.py
   python-stdnum/stdnum/iso7064/mod_37_2.py
   python-stdnum/stdnum/iso7064/mod_37_36.py
   python-stdnum/stdnum/meid.py
   python-stdnum/stdnum/verhoeff.py
   python-stdnum/tests/test_bsn.doctest
   python-stdnum/tests/test_ismn.doctest

Modified: python-stdnum/stdnum/bsn.py
==============================================================================
--- python-stdnum/stdnum/bsn.py Sat Aug 28 18:12:23 2010        (r37)
+++ python-stdnum/stdnum/bsn.py Sun Aug 29 21:27:59 2010        (r38)
@@ -35,7 +35,7 @@
     """Convert the number to the minimal representation. This strips the
     number of any valid separators and removes surrounding whitespace."""
     number = number.replace(' ','').replace('-','').replace('.','').strip()
-    # padd with leading zeroes
+    # pad with leading zeroes
     return (9 - len(number)) * '0' + number
 
 def _calc_checksum(number):

Modified: python-stdnum/stdnum/isan.py
==============================================================================
--- python-stdnum/stdnum/isan.py        Sat Aug 28 18:12:23 2010        (r37)
+++ python-stdnum/stdnum/isan.py        Sun Aug 29 21:27:59 2010        (r38)
@@ -55,9 +55,9 @@
         return ( number[0:12], number[12:16], number[16:], '', '' )
 
 def compact(number, strip_check_digits=True):
-    """Convert the ISAN to the minimal (hexadicimal) representation.
-    digits. This strips the number of any valid separators and removes
-    surrounding whitespace. The check digits are also removed by default."""
+    """Convert the ISAN to the minimal representation. This strips the number
+    of any valid separators and removes surrounding whitespace. The check
+    digits are also removed by default."""
     number = list(split(number))
     number[2] = number[4] = ''
     return ''.join(number)

Modified: python-stdnum/stdnum/iso7064/mod_37_2.py
==============================================================================
--- python-stdnum/stdnum/iso7064/mod_37_2.py    Sat Aug 28 18:12:23 2010        
(r37)
+++ python-stdnum/stdnum/iso7064/mod_37_2.py    Sun Aug 29 21:27:59 2010        
(r38)
@@ -31,7 +31,7 @@
 1
 
 By changing the alphabet this can be turned into any Mod x, 2
-algorith. For example Mod 10, 2:
+algorithm. For example Mod 10, 2:
 
 >>> calc_check_digit('079', alphabet='0123456789X')
 'X'

Modified: python-stdnum/stdnum/iso7064/mod_37_36.py
==============================================================================
--- python-stdnum/stdnum/iso7064/mod_37_36.py   Sat Aug 28 18:12:23 2010        
(r37)
+++ python-stdnum/stdnum/iso7064/mod_37_36.py   Sun Aug 29 21:27:59 2010        
(r38)
@@ -31,7 +31,7 @@
 True
 
 By changing the alphabet this can be turned into any Mod x+1, x
-algorith. For example Mod 11, 10:
+algorithm. For example Mod 11, 10:
 
 >>> calc_check_digit('00200667308', alphabet='0123456789')
 '5'

Modified: python-stdnum/stdnum/meid.py
==============================================================================
--- python-stdnum/stdnum/meid.py        Sat Aug 28 18:12:23 2010        (r37)
+++ python-stdnum/stdnum/meid.py        Sun Aug 29 21:27:59 2010        (r38)
@@ -72,7 +72,7 @@
         return luhn.calc_check_digit(number, alphabet=_hex_alphabet)
 
 def compact(number, strip_check_digit=True):
-    """Convert the MEID number to the minimal (hexadicimal) representation.
+    """Convert the MEID number to the minimal (hexadecimal) representation.
     This strips grouping information, removes surrounding whitespace and
     converts to hexadecimal if needed. If the check digit is to be preserved
     and conversion is done a new check digit is recalculated."""
@@ -108,7 +108,7 @@
     return not cd or luhn.is_valid(number + cd, alphabet=_hex_alphabet)
 
 def format(number, separator=' ', format=None, add_check_digit=False):
-    """Reformat the passed number to the standard format. The separater
+    """Reformat the passed number to the standard format. The separator
     used can be provided. If the format is specified (either 'hex' or
     'dec') the number is reformatted in that format, otherwise the current
     representation is kept. If add_check_digit is True a check digit will

Modified: python-stdnum/stdnum/verhoeff.py
==============================================================================
--- python-stdnum/stdnum/verhoeff.py    Sat Aug 28 18:12:23 2010        (r37)
+++ python-stdnum/stdnum/verhoeff.py    Sun Aug 29 21:27:59 2010        (r38)
@@ -20,7 +20,7 @@
 """Module for calculation and verifying the checksum of a number
 using the Verhoeff algorithm.
 
-Validation can be done with is_valid() which validates thet the
+Validation can be done with is_valid() which validates that the
 calculated checksum is 0. A valid number can be made by calculating
 the check digit and appending it.
 

Modified: python-stdnum/tests/test_bsn.doctest
==============================================================================
--- python-stdnum/tests/test_bsn.doctest        Sat Aug 28 18:12:23 2010        
(r37)
+++ python-stdnum/tests/test_bsn.doctest        Sun Aug 29 21:27:59 2010        
(r38)
@@ -32,7 +32,7 @@
 >>> bsn.is_valid('111252333')
 False
 
-These are tests to check what happes when a wrong type is passed.
+These are tests to check what happens when a wrong type is passed.
 
 >>> bsn.is_valid(111222333) # integer, not string
 False

Modified: python-stdnum/tests/test_ismn.doctest
==============================================================================
--- python-stdnum/tests/test_ismn.doctest       Sat Aug 28 18:12:23 2010        
(r37)
+++ python-stdnum/tests/test_ismn.doctest       Sun Aug 29 21:27:59 2010        
(r38)
@@ -41,7 +41,7 @@
 True
 
 
-These are tests to check what happes when a wrong type is passed.
+These are tests to check what happens when a wrong type is passed.
 
 >>> ismn.is_valid(1857982185) # integer, not string
 False
--
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits