A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-September/048658.html below:

[Python-Dev] Re: Dangerous exceptions (was Re: Another test_compilermystery)

[Python-Dev] Re: Dangerous exceptions (was Re: Another test_compilermystery) [Python-Dev] Re: Dangerous exceptions (was Re: Another test_compilermystery)Barry Warsaw barry at python.org
Tue Sep 7 18:01:08 CEST 2004
On Tue, 2004-09-07 at 11:11, Kevin Jacobs wrote:

> My policy for bare excepts is that without significant justification
> they _must_ either re-raise the original exception or raise another
> exception.  There are very few circumstances where I have allowed
> my team to write pure bare excepts.  I haven't checked, but a warning
> for violations of this rule may be a nice addition to pychecker or pylint.

The other case I've seen are for command-shell like loops, where you
might print the exception in the bare except, but not re-raise the
exception.  Think about the main interactive interpreter loop.

But yeah I agree, you want strong justification for any use of bare
except.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20040907/0ad56503/attachment.pgp
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4