Matt Nordhoff wrote:
Victor Subervi wrote:
On Mon, Dec 28, 2009 at 1:41 PM, MRAB <pyt...@mrabarnett.plus.com
<mailto:pyt...@mrabarnett.plus.com>> wrote:
DON'T USE BARE EXCEPTS!

(There are 2 in your code.)
There are times when they are *necessary*.

No, there aren't.

Even if there were, this is not one of those situations.
And to elaborate a little bit, someone said in this list (sorry, don't remember who) that often people think that making their code robust is one of the top priority, especially when you are providing some services to clients. That could be true. The fact is that most newcomers thinks bare try except will do the trick: "look, my server never crashes". Yes it does not crash, but even worse, it handles exception in an inapropriate way that leads the server to behave in a reliable, yet unpredictable, manner. And that is definitely *not* being robust.


JM

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

Reply via email to