Tidyied use of flag in calling column transposition worker
authorNeil Smith <neil.git@njae.me.uk>
Mon, 18 Nov 2013 15:19:30 +0000 (15:19 +0000)
committerNeil Smith <neil.git@njae.me.uk>
Mon, 18 Nov 2013 15:19:30 +0000 (15:19 +0000)
cipher.py

index 40e771fd2d940c73cd943ef261f91455d0707b54..4fa44cf65a2c31fbef399ffa4b3f3a57bc041064 100644 (file)
--- a/cipher.py
+++ b/cipher.py
@@ -433,22 +433,22 @@ def column_transposition_encipher(message, keyword):
     >>> column_transposition_encipher('hellothere', 'clever')
     'hleolteher'
     """
-    return column_transposition_worker(message, keyword, True)
+    return column_transposition_worker(message, keyword, encipher=True)
 
 def column_transposition_decipher(message, keyword):
     """
     >>> column_transposition_decipher('hleolteher', 'clever')
     'hellothere'
     """
-    return column_transposition_worker(message, keyword, False)
+    return column_transposition_worker(message, keyword, encipher=False)
 
 def column_transposition_worker(message, keyword, encipher=True):
     """
     >>> column_transposition_worker('hellothere', 'clever')
     'hleolteher'
-    >>> column_transposition_worker('hellothere', 'clever', True)
+    >>> column_transposition_worker('hellothere', 'clever', encipher=True)
     'hleolteher'
-    >>> column_transposition_worker('hleolteher', 'clever', False)
+    >>> column_transposition_worker('hleolteher', 'clever', encipher=False)
     'hellothere'
     """
     transpositions = transpositions_of(keyword)