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

[Python-Dev] TypeError and AttributeError

[Python-Dev] TypeError and AttributeError [Python-Dev] TypeError and AttributeErrorBarry A. Warsaw barry@digicool.com
Wed, 11 Jul 2001 18:08:05 -0400
>>>>> "JA" == James Althoff <James_Althoff@i2.com> writes:

    JA> Given that

    JA> except (TypeError, AttributeError):

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

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

    JA> except (TypeError):

    JA> would become equally "safe" (and simpler)?

No, but it /might/ make sense to give them a new common base class
between them and Exception.  If so, called what?

-Barry



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