[pypy-issue] [issue1126] __exit__ is not called when an exception raised inside of generator

Armin Rigo tracker at bugs.pypy.org
Thu Apr 12 09:49:16 CEST 2012

Armin Rigo <armin.rigo at gmail.com> added the comment:

The issue is the "yield" inside the "with".  Allowing this as valid syntax is
IMHO a broken decision from CPython.  This "with" block will terminate only when
next() is called (never here) or when the complete generator is
gargabe-collected (which means "at some point in the future probably" if you
don't have reference counting).

nosy: +arigo
status: invalid -> wontfix

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list