From 0b45f7b2ba45c42ad9dc9d1b269c4b2dd92ce428 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Tue, 2 Nov 2021 21:04:51 +0000 Subject: [PATCH] Swap syntaxes --- alphabetseq | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/alphabetseq b/alphabetseq index f7375a6..6fdb0ac 100755 --- a/alphabetseq +++ b/alphabetseq @@ -32,9 +32,9 @@ def convert_start_stop(s, alphabet): if ':' in s: valalphabet, value = s.split(':') if not valalphabet: - valalphabet = alphabet + valalphabet = '0123456789' else: - valalphabet, value = '0123456789', s + valalphabet, value = alphabet, s return alphabet_to_decimal(value, valalphabet) @@ -60,6 +60,6 @@ if __name__ == '__main__': print('Generates the sequence from START to STOP (inclusive) using ALPHABET', file = sys.stderr) print('If STOP is omitted, it defaults to START, effectively making this a simple base transformation', file = sys.stderr) print('START and STOP have values of the form [[VALALPHABET]:]VALUE.', file = sys.stderr) - print(' In the [VALALPHABET]:VALUE form, VALUE is expressed in terms of VALALPHABET, which defaults to ALPHABET if omitted.', file = sys.stderr) - print(' In the VALUE form, it is treated as a decimal number.', file = sys.stderr) + print(' In the [VALALPHABET]:VALUE form, VALUE is expressed in terms of VALALPHABET, which defaults to 0123456789 (i.e. decimal) if omitted.', file = sys.stderr) + print(' In the VALUE form, it is converted using ALPHABET.', file = sys.stderr) sys.exit(1)