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 BreamoreBoy, bethard, dougalsutherland, paul.j3
Date 2014-07-14.18:53:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405364032.47.0.372138069448.issue16807@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-07-14 18:53:52paul.j3setrecipients: + paul.j3, bethard, BreamoreBoy, dougalsutherland
2014-07-14 18:53:52paul.j3setmessageid: <1405364032.47.0.372138069448.issue16807@psf.upfronthosting.co.za>
2014-07-14 18:53:52paul.j3linkissue16807 messages
2014-07-14 18:53:52paul.j3create