paul j3 added the comment: This patch adds a
class TestMutuallyExclusiveGroupErrors test_invalid_add_group() test, closely modeled on test_invalid_add_argument() I'm using ValueError in group add methods (maintaining the similarity with add_argument errors). I haven't changed the documentation. add_argument_group and add_mutually_exclusive_group methods are described as belonging to an ArgumentParser, and the examples are consistent with that. An admonition against nesting groups would not fit with the current flow. However to be accurate, these methods belong to _ActionsContainer, the parent class for both the parser and groups. The documentation glosses over this detail. So an alternative way of addressing this issue is to move these 2 methods to the ArgumentParser class. ---------- Added file: http://bugs.python.org/file36100/issue22047_2.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