-def keyword_cipher_alphabet_of(keyword, wrap_alphabet=False):
- """Find the cipher alphabet given a keyword
-
- >>> keyword_cipher_alphabet_of('harry')
- 'harybcdefgijklmnopqstuvwxz'
- >>> keyword_cipher_alphabet_of('harry', True)
- 'haryzbcdefgijklmnopqstuvwx'
- >>> keyword_cipher_alphabet_of('harry', False)
- 'harybcdefgijklmnopqstuvwxz'
+def keyword_cipher_alphabet_of(keyword, wrap_alphabet=0):
+ """Find the cipher alphabet given a keyword.
+ wrap_alphabet controls how the rest of the alphabet is added
+ after the keyword.
+ 0 : from 'a'
+ 1 : from the last letter in the sanitised keyword
+ 2 : from the largest letter in the sanitised keyword
+
+ >>> keyword_cipher_alphabet_of('bayes')
+ 'bayescdfghijklmnopqrtuvwxz'
+ >>> keyword_cipher_alphabet_of('bayes', 0)
+ 'bayescdfghijklmnopqrtuvwxz'
+ >>> keyword_cipher_alphabet_of('bayes', 1)
+ 'bayestuvwxzcdfghijklmnopqr'
+ >>> keyword_cipher_alphabet_of('bayes', 2)
+ 'bayeszcdfghijklmnopqrtuvwx'