[issue11428] with statement looks up __exit__ incorrectly

benrg report at bugs.python.org
Mon Mar 7 09:35:46 CET 2011


benrg <benrudiak at gmail.com> added the comment:

But when I translate my example according to PEP 343, it works (i.e., doesn't raise an exception) in 3.2, and PEP 343 says "[t]he details of the above translation are intended to prescribe the exact semantics." So I think that at least one of PEP 343, the evaluation of mgr.__exit__, or the evaluation of with mgr: pass must be broken, though I'm no longer sure which.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11428>
_______________________________________


More information about the Python-bugs-list mailing list