László Attila Tóth <laszlo.attila.t...@gmail.com> added the comment:

According to the documentation only the ArgumentParser has add_argument_group 
option, which is not true, the code allows me to add a subgroup to any group. 
The complete example is in issue 4608: https://bugs.python.org/issue46058

If add_argument_group shouldn't be used for a regular argument group,
I suggest the following change: _ActionsContainer.add_argument_group should 
return self if title is not specified and raise error if 
add_argument_group("...") is called on a group with title.

This is close to the originally intended, documented behaviour.

I'd still allow groups without title in mutually exclusive groups and vice 
versa.

----------

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

Reply via email to