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 paul.j3
Recipients Sam.Kerr, paul.j3
Date 2014-07-26.06:05:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406354738.07.0.0570950697848.issue22047@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-07-26 06:05:38paul.j3setrecipients: + paul.j3, Sam.Kerr
2014-07-26 06:05:38paul.j3setmessageid: <1406354738.07.0.0570950697848.issue22047@psf.upfronthosting.co.za>
2014-07-26 06:05:38paul.j3linkissue22047 messages
2014-07-26 06:05:37paul.j3create