Browse Source

Swap syntaxes

master
JustAnotherArchivist 2 years ago
parent
commit
0b45f7b2ba
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      alphabetseq

+ 4
- 4
alphabetseq View File

@@ -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)

Loading…
Cancel
Save