[Python-Dev] PEP 389: argparse - new command line parsing module

Steven Bethard steven.bethard at gmail.com
Sat Oct 3 17:12:49 CEST 2009

On Sat, Oct 3, 2009 at 3:45 AM, Yuvgoog Greenle <ubershmekel at gmail.com> wrote:
> I haven't checked if it's possible, but I suggest Argparse have it's
> own exception class that inherits from SystemExit and that exception
> would be thrown.
> ParseError, or something similar.
> I suggest this just because it would be more readable I guess and
> would exactly explain why this code exits.

I've never seen such an idiom before (subclassing SystemExit) but it
would certainly be possible create an ArgumentParserExit exception
like that. Then you would have your choice of overriding .exit() or
catching the exception.

Where did you get that preposterous hypothesis?
Did Steve tell you that?
        --- The Hiphopopotamus

More information about the Python-Dev mailing list