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 xuanji
Recipients bethard, docs@python, eric.araujo, jayt, tanqazx, xuanji
Date 2011-04-27.10:24:25
SpamBayes Score 6.522782e-11
Marked as misclassified No
Message-id <1303899867.28.0.142696158033.issue9938@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think it's best to create a new subclass to throw an ArgumentParserExit exception; if I read the stack trace I'd see that an ArgumentError was thrown, then caught, then an ArgumentParserExit was thrown, which IMHO is confusing. In the current design, parse_known_errors catches an ArgumentError and then exits. I propose that the user be optionally allowed to turn off the handling of ArgumentError and to handle it himself instead through an exit_on_argument_error flag. 

Attached patch does this. Also I think this issue falls under component 'Lib' too.
History
Date User Action Args
2011-04-27 10:24:27xuanjisetrecipients: + xuanji, bethard, eric.araujo, docs@python, jayt, tanqazx
2011-04-27 10:24:27xuanjisetmessageid: <1303899867.28.0.142696158033.issue9938@psf.upfronthosting.co.za>
2011-04-27 10:24:26xuanjilinkissue9938 messages
2011-04-27 10:24:26xuanjicreate