paul j3 added the comment:

To put this issue in perspective:

- There's nothing in the documentation about nesting a mutually exclusive group 
in an argument group.

- There are prominent notes in the documentation about MEGs not taking title 
and description.  The '_add_container_actions' code has a warning that 
something needs to change if they do acquire such attributes.

- However there is a class in test_argparse.py that does nest an MEG in an 
argument group, which in effect gives it a title.
TestMutuallyExclusiveInGroup
That's the pattern that Dougal is using.

- http://bugs.python.org/issue17218 support title and description in argparse 
add_mutually_exclusive_group

proposes adding these attributes to MEG.  There I proposed doing so via this 
nested group mechanism.  So that patch requires this one to work correctly with 
parents.

- http://bugs.python.org/issue11588 I am exploring the implementation of 
UsageGroups, a generalization of MEG that allow other group tests, and nesting. 
 There too title and description come via nesting in an ArgumentGroup.

- Groups and parents are confusing to beginning users.  In StackOverflow 
questions 'argparse' users often confuse argument groups and mutually exclusive 
groups, expecting to be able to nest one inside the other.  Currently that 
nesting only works one way, and for the limited purpose illustrated here.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16807>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to