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/2008-May/079642.html below:

[Python-Dev] disappearing exceptions

[Python-Dev] disappearing exceptions [Python-Dev] disappearing exceptionsGreg Ewing greg.ewing at canterbury.ac.nz
Wed May 21 02:19:42 CEST 2008
Christian Heimes wrote:
> Thankfully this issue was fixed in Python 2.6 and 3.0. In newer versions
> of Python hasattr() only swallows exception based on the Exception class
> but not BaseExceptions.

Shouldn't it only be catching AttributeError, though?

> We should make sure all code in the core behaves
> the same way. Exceptions based on BaseException must *never* be
> swallowed.

Seems to me that all code in the core that catches exceptions
should only be catching the exceptions it really needs
to catch. That requires looking at each case individually
rather than a blanket "catch Exception" recommendation
(although that might still be an improvement over the
status quo).

-- 
Greg
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