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/2002-July/027046.html below:

[Python-Dev] patch: try/finally in generators

[Python-Dev] patch: try/finally in generators [Python-Dev] patch: try/finally in generatorsGuido van Rossum guido@python.org
Mon, 29 Jul 2002 16:09:05 -0400
> http://www.python.org/sf/584626
> 
> This patch removes the limitation of not allowing yield in the try part
> of a try/finally. The dealloc function of a generator checks if the 
> generator is still alive and resumes it one last time from the return 
> instruction at the end of the code, causing any try/finally blocks to be 
> triggered. Any exceptions raised are treated just like exceptions in a
> __del__ finalizer (printed and ignored).

Try building Python in debug mode, and then run the test suite.  I get
a fatal error in test_generators (but not when that test is run in
isolation):

Fatal Python error: ../Python/ceval.c:2256 object at 0x40b05654 has negative ref count -1

--Guido van Rossum (home page: http://www.python.org/~guido/)



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