[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()
paul j3
report at bugs.python.org
Wed Dec 16 19:06:43 EST 2015
paul j3 added the comment:
In
_ActionsContainer._add_container_actions there is this note:
# add container's mutually exclusive groups
# NOTE: if add_mutually_exclusive_group ever gains title= and
# description= then this code will need to be expanded as above
In other bug/issues we've noted that the way to give an exclusive group a title and description is to nest it in an argument_group.
So it looks like no one has worked through the details - in this parent situation - of adding a nested mutually exclusive group.
In my preliminary tests, it looks like the 'group_map' is being messed up by the block of code that adds the mutually_exclusive_groups. I don't know how easy it is to fix that.
The immediate user solution is not use parents and nested mutually exclusive groups together.
----------
nosy: +paul.j3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25882>
_______________________________________
More information about the Python-bugs-list
mailing list