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 Laszlo.Attila.Toth
Recipients Laszlo.Attila.Toth, iritkatriel
Date 2021-12-13.06:48:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639378111.1.0.107134874113.issue46057@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-12-13 06:48:31Laszlo.Attila.Tothsetrecipients: + Laszlo.Attila.Toth, iritkatriel
2021-12-13 06:48:31Laszlo.Attila.Tothsetmessageid: <1639378111.1.0.107134874113.issue46057@roundup.psfhosted.org>
2021-12-13 06:48:31Laszlo.Attila.Tothlinkissue46057 messages
2021-12-13 06:48:30Laszlo.Attila.Tothcreate