On 8/19/2011 1:24 PM, John Gordon wrote:
In<4e4ec405$0$29994$c3e8da3$54964...@news.astraweb.com>  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.

   Right.  When in doubt, catch EnvironmentError.  That means something
external to the program, at the OS or network level, has a problem.
"Exception" covers errors which are program bugs, like references to
undefined class members.

                                        John Nagle
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to