Python style: exceptions vs. sys.exit()

Tim Rowe digitig at gmail.com
Wed Sep 24 10:51:30 EDT 2008


2008/9/24 Bruno Desthuilliers <bruno.42.desthuilliers at websiteburo.invalid>:
> Drake a écrit :

>> many of the library functions to raise IOError Exceptions. The
>> question is: should the library function be able to just dump to
>> sys.exit() with a message about the error (like "couldn't open this
>> file"),
>
> Arrghll ! NO, DONT !

Can I put in a vote *for* the questioner's library dumping to
sys.exit() on any abnormal condition? It would reduce employment
competition for the rest of us.

Why, yes, I am wearing my BOFH hat. How could you tell?

-- 
Tim Rowe



More information about the Python-list mailing list