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/053371.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-finallyTim Peters tim.peters at gmail.com
Thu May 5 02:29:07 CEST 2005
[Shane Holloway]
> And per the PEP, I think the explaining that::
> 
>     try:
>         A
>     except:
>         B
>     else:
>         C
>     finally:
>         D
>
> is *exactly* equivalent to::
> 
>     try:
>         try:
>             A
>         except:
>             B
>         else:
>             C
>     finally:
>         D
> 
> Resolved all the questions about control flow for me.  Well, assuming
> that implementation makes the explanation truth.  ;)

Yup!  It's not unreasonable to abbreviate it, but the second form is
obvious on the face of it, and can already be written.  I'm neutral on
adding the slightly muddier shortcut.
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