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

Nick Coghlan ncoghlan at gmail.com
Sun Oct 4 09:56:20 CEST 2009


Yuvgoog Greenle wrote:
> I know this might come through as bike shedding but it's just
> customary python that every module have it's own exception types as to
> not mix them up with others.

Not in my Python world it isn't. While that is sometimes the right
answer, more often the right answer is to properly scope your try/except
statement in order to avoid catching exceptions from code you aren't
interested in. If you end up stuck with a library call that lacks both
granularity and specificity of exceptions then you live with it (and
maybe file a bug report/feature request with the library author).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list