When to use exceptions (was Re: reducing if statements...)

Paul Rubin phr-n2001 at nightsong.com
Thu Aug 23 07:35:34 EDT 2001


tanzer at swing.co.at (Christian Tanzer) writes:
> I'd strongly prefer a IOError exception hierarchy with one exception
> class for each different errno value to the current situation. You
> could still catch IOError, but you could also just catch the odd
> DeviceFull or PermissionDenied exception and leave all others to your
> caller. 

This makes sense to me.



More information about the Python-list mailing list