On 24/08/2013 11:27, Steven D'Aprano wrote:
On Fri, 23 Aug 2013 22:25:55 -0700, snarf wrote:
[snip]
* Using
Exception is typically a bad. More specific the better.

Yes, you should always try to catch the specific exceptions you care
about:


# Best
except ValueError, OverflowError, ZeroDivisionError:

That should be:

except (ValueError, OverflowError, ZeroDivisionError):


# Not so good
except Exception:


# Worst
except:

[snip]

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

Reply via email to