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/2002-March/020896.html below:

[Python-Dev] For review: PEP 285: Adding a bool type

[Python-Dev] For review: PEP 285: Adding a bool type [Python-Dev] For review: PEP 285: Adding a bool typeBarry A. Warsaw barry@zope.com
Sun, 10 Mar 2002 17:55:40 -0500
>>>>> "DA" == David Ascher <DavidA@ActiveState.com> writes:

    DA> Good point.  This reminds me of the unofficial deprecation of
    DA> string exceptions.  I still find using string exceptions is
    DA> darn convenient. Just adding 'import exceptions' is enough of
    DA> a step to stop me from doing it 'right' until the program has
    DA> scaled up enough (usually the same point where top-level
    DA> functions become methods on a new class =).

Why do you have to import exceptions?  All the exception classes in
exceptions are already builtins.  Is

    class MyEXC(Exception): pass

really any more typing than

    MyEXC = 'My Exception'

(expecially given that the base class specification isn't even
necessary)?

-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