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/2009-March/087776.html below:

[Python-Dev] suggestion for try/except program flow

[Python-Dev] suggestion for try/except program flow [Python-Dev] suggestion for try/except program flowMark Donald foobarmus at gmail.com
Fri Mar 27 09:57:38 CET 2009
I frequently have this situation:

try:
    try:
        raise Thing
    except Thing, e:
        # handle Thing exceptions
        raise
except:
    # handle all exceptions, including Thing

It would be much more readable if there were a way to recatch a named
exception with the generic (catch-all) except clause of its own try,
something like this:

try:
    raise Thing
except Thing, e:
    # handle Thing exceptions
    recatch
except:
    # handle all exceptions, including Thing
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