This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients actionless, bethard, paul.j3
Date 2018-02-14.02:23:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518575037.3.0.467229070634.issue32756@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-02-14 02:23:57paul.j3setrecipients: + paul.j3, bethard, actionless
2018-02-14 02:23:57paul.j3setmessageid: <1518575037.3.0.467229070634.issue32756@psf.upfronthosting.co.za>
2018-02-14 02:23:57paul.j3linkissue32756 messages
2018-02-14 02:23:56paul.j3create