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/2001-July/015864.html below:

[Python-Dev] TypeError and AttributeError

[Python-Dev] TypeError and AttributeError [Python-Dev] TypeError and AttributeErrorJames_Althoff@i2.com James_Althoff@i2.com
Wed, 11 Jul 2001 15:02:23 -0700
Given that

except (TypeError, AttributeError):

is the "safest across releases" idiom (as suggested by Tim Peters),

would it make sense to make AttributeError a subclass of TypeError so that

except (TypeError):

would become equally "safe" (and simpler)?

Potentially, some exception handling code would behave differently
(break?), but apparently this is already the case given that what is raised
(AttributeError or TypeError) changes between releases.

Jim




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