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/2006-May/064807.html below:

[Python-Dev] more pyref: continue in finally statements

[Python-Dev] more pyref: continue in finally statements [Python-Dev] more pyref: continue in finally statementsMichael Urman murman at gmail.com
Wed May 3 05:49:33 CEST 2006
On 5/1/06, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> then what should be the meaning of "continue" here? The finally
> block *eventually* needs to re-raise the exception. When should
> that happen?

It should behave similarly to return and swallow the exception. In
your example this would result in an infinite loop. Alternately the
behavior of return should be changed, and the below code would no
longer work as it does today.

>>> def foo():
...   try: raise Exception
...   finally: return 'Done'
...
>>> foo()
'Done'

Michael
--
Michael Urman  http://www.tortall.net/mu/blog
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