Message312151
This error message is intentional.
In def consume_optional(start_index):
# identify additional optionals in the same arg string
# (e.g. -xyz is the same as -x -y -z if no args are required)
# if the action is a single-dash option and takes no
# arguments, try to parse more single-dash options out
# of the tail of the option string
chars = self.prefix_chars
if arg_count == 0 and option_string[1] not in chars:
action_tuples.append((action, [], option_string))
char = option_string[0]
option_string = char + explicit_arg[0]
new_explicit_arg = explicit_arg[1:] or None
optionals_map = self._option_string_actions
if option_string in optionals_map:
action = optionals_map[option_string]
explicit_arg = new_explicit_arg
else:
msg = _('ignored explicit argument %r')
raise ArgumentError(action, msg % explicit_arg)
In other words, it doesn't just split off that extra character and add it to 'argument_strings' for further handling.
Either 'b' is an argument for the '-a' flag or it is a '-b' flag itself. It can't be a positional or extra. |
|
| Date |
User |
Action |
Args |
| 2018-02-14 02:23:57 | paul.j3 | set | recipients:
+ paul.j3, bethard, actionless |
| 2018-02-14 02:23:57 | paul.j3 | set | messageid: <1518575037.3.0.467229070634.issue32756@psf.upfronthosting.co.za> |
| 2018-02-14 02:23:57 | paul.j3 | link | issue32756 messages |
| 2018-02-14 02:23:56 | paul.j3 | create | |
|