[issue5251] contextlib.nested inconsistent with, well, nested with statements due exceptions raised in __enter__

James William Pye report at bugs.python.org
Sun Mar 15 07:46:48 CET 2009


James William Pye <x at jwp.name> added the comment:

Just downloaded v2 and tried it out against Python 2.7a0 (trunk:70381M,
Mar 14 2009, 23:12:51).

output of the "nested_issue.py" script with patch:

jwp at torch[]:org/python/trunk 0% /src/build/py/bin/python ./nested_issue.py
()
[try_with_nested]
Skipping statement body
()
SUCCESS! i guess..
()
[try_with_nested_class]
Skipping statement body
()
SUCCESS! i guess..
()
[try_with_nested_statements]
()
SUCCESS! i guess..
()
[try_with_nested_statements_class]
()
SUCCESS! i guess..

I'm going to play with it a bit more, but it looks pretty solid already...

----------

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


More information about the Python-bugs-list mailing list