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

Yuvgoog Greenle ubershmekel at gmail.com
Sat Oct 3 12:45:09 CEST 2009

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.

On Sat, Oct 3, 2009 at 8:15 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Toshio Kuratomi wrote:
>> About exit(), I agree with others about wanting to catch the exception
>> myself and then choosing to exit from the code.  I'm not sure that it's
>> actually useful in practice, though...it might just feel cleaner but not
>> actually be that helpful.
> As others have pointed out, if you want to do that then you can just
> catch SystemExit.
> Cheers,
> Nick.
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> ---------------------------------------------------------------
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/ubershmekel%40gmail.com

More information about the Python-Dev mailing list