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-August/047912.html below:

[Python-Dev] Exception hierarchy [was Re: Another test_compilermystery]

[Python-Dev] Exception hierarchy [was Re: Another test_compilermystery] [Python-Dev] Exception hierarchy [was Re: Another test_compilermystery]Delaney, Timothy C (Timothy) tdelaney at avaya.com
Tue Aug 17 03:11:17 CEST 2004
James Y Knight wrote:

> One issue is that creating a new category of Exceptions doesn't help
> people who do "except:" instead of "except Exception:". It is unlikely
> that person meant to catch things like MemoryError, rather, they were
> just being lazy. I suppose that syntax could be deprecated, at least
> in 
> example code and documentation, in favor of "except Exception" for the
> usual case, and "except Raisable" for the cases where you do actually
> want to catch everything*.

Personally, I would be in favour of a bare except being equivalent in
new code to 'except Exception'. Although this does violate 'in the
presence of ambiguity, resist the temptation to guess'.

Tim Delaney
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