From: Neil Smith Date: Mon, 18 Nov 2013 15:19:30 +0000 (+0000) Subject: Tidyied use of flag in calling column transposition worker X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=a573fbbbdcdc110be7b35cbe78a8a45af99da461;p=cipher-tools.git Tidyied use of flag in calling column transposition worker --- diff --git a/cipher.py b/cipher.py index 40e771f..4fa44cf 100644 --- 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)