Currently I am writing the script that accepts space separated arguments like this
parser = argparse.ArgumentParser(description='foo 1.0')
parser.add_argument('-a', '--arch', help='specify the angle', nargs="+" choices=ch_list, required=True
I am passing either
+foo +bar +baz
or
-foo -bar -baz
or
foo bar baz
where foo bar baz
are alphanum elements
What is the most elegant way of sorting arguments out?
Either all should have +
sign or -
sign or no sign at all, if arguments mix happened the script should throw the error and exit.