From a573fbbbdcdc110be7b35cbe78a8a45af99da461 Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Mon, 18 Nov 2013 15:19:30 +0000 Subject: [PATCH] Tidyied use of flag in calling column transposition worker --- cipher.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) -- 2.34.1