[issue22047] argparse improperly prints mutually exclusive options when they are in a group
paul j3
report at bugs.python.org
Fri Jul 25 23:37:22 CEST 2014
paul j3 added the comment:
Here's a preliminary patch that raises an error if there's an attempt to nest a mutually exclusive group in another, or there's an attempt to add an argument group to either kind of group.
It still needs test_argparse.py and argparse.rst changes
I'm raising a ValueError, since that is what most of the other add_argument errors do. An alternative is a NotImplementedError, since that is, in effect, what I am doing, blocking the implementation of particular 'add' methods.
An alternative to adding this patch as high priority bug issue, is to include it in the UsageGroup patch (11588) which will implement nestable groups.
----------
keywords: +patch
Added file: http://bugs.python.org/file36093/issue22047_1.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22047>
_______________________________________
More information about the Python-bugs-list
mailing list