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/2005-May/053357.html below:

[Python-Dev] Pre-PEP: Unifying try-except and try-finally

[Python-Dev] Pre-PEP: Unifying try-except and try-finally [Python-Dev] Pre-PEP: Unifying try-except and try-finallySkip Montanaro skip at pobox.com
Wed May 4 22:27:33 CEST 2005
    Tim> What about `else` mixed with try/except/finally?

    Tim> try:
    Tim>     A
    Tim> except:
    Tim>     B
    Tim> else:
    Tim>     C
    Tim> finally:
    Tim>     D

    Tim> If A executes without exception, does D execute before or after C?

According to Guido, execution is A, C, D in the normal case and A, B, D in
the exceptional case.  Execution never jumps back.

    Tim> I'm not saying we can't make up reasonable answers.  I'm saying
    Tim> they look more-or-less arbitrary, while the current nested forms
    Tim> are always clear.

As far as arbitrary answers go, execution only in the forward direction
seems more reasonable than jumping forward and back.

Skip
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