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 <rep...@bugs.python.org>
<http://bugs.python.org/issue22047>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to