Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> writes:
>> You can catch all exceptions by catching the base class Exception:
>
> Except that is nearly always poor advice, because it catches too much: it
> hides bugs in code, as well as things which should be caught.
> You should always catch the absolute minimum you need to catch.

But there's no way to know what that minimum is.  Python libraries throw
all sorts of exceptions that their documentation doesn't mention.
Java's checked exceptions are obnoxious but they do have their
attractions.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to