[pypy-issue] [issue736] 'finally' suite not invoked in generator function

Antonio Cuni tracker at bugs.pypy.org
Fri Jun 3 15:11:12 CEST 2011


Antonio Cuni <anto.cuni at gmail.com> added the comment:

The finally is printed when the generator object is garbage collected.
Since CPython has reference counting, the generator is collected immediately,
while on PyPy is not.

If you add "import gc; gc.collect()" at the end of the script, the "finally" is
printed also on Pypy

----------
status: unread -> wontfix

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue736>
________________________________________


More information about the pypy-issue mailing list