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

[Python-Dev] Proposing a sys.special_exceptions tuple

[Python-Dev] Proposing a sys.special_exceptions tuple [Python-Dev] Proposing a sys.special_exceptions tupleRaymond Hettinger python at rcn.com
Fri Oct 1 08:28:17 CEST 2004
> A candidate implementation is up at SF. Patch # 1038256.
> 
> It uses the name 'special_exceptions' and includes SystemExit,
> MemoryError,
> KeyboardInterrupt and StopIteration (adding/removing exceptions from
the
> list is
> easy, as is changing the name).
> 
> One version of the patch creates 'exceptions.special_exceptions' only,
and
> the
> other version also creates a builtin.

Since we're trying to catch anything *not* special, is the intended
usage something like this:

    try:
        func()
    except special_exceptions:
        raise
    except:
        altfunc()  # handle non-special exceptions


Raymond

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