[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts

paul j3 report at bugs.python.org
Fri Jul 12 20:18:24 CEST 2013


paul j3 added the comment:

While playing with some examples, I found that exclusive group formatting has another failure case.  If the usage line is long enough to wrap, optionals and positionals are formatted separately, with positionals appearing on a separate line(s).  That means that if a group includes a positional, it will not be marked.

So (shortening lines for convenience sake), instead of:

    usage: [-h] ... (-a | -b | x)

we get

    usage: [-h] ... [-a] [-b]
           x

This is true even if arguments are added to the group in the normal way.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10984>
_______________________________________


More information about the Python-bugs-list mailing list