Message187754
| Author |
paul.j3 |
| Recipients |
BreamoreBoy, Jason.Baker, bethard, eric.araujo, paul.j3 |
| Date |
2013年04月25日.04:31:57 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1366864318.5.0.870637145349.issue9849@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This is a revision of yesterday's patch. It includes a couple of test cases that check that parser, groups, and exclusive groups all produce the error message.
I also changed the metavar tuple case to return an ArgumentError, and changed test_argparse.py accordingly. (this metavar testing was added in http://bugs.python.org/issue9348).
This issue overlaps with http://bugs.python.org/issue16970, 'argparse: bad nargs value raises misleading message'. There, though, the focus is more on the error message when nargs=0. While nargs<1 might not make much sense, it technically does not break anything. |
|