alon horev <alo...@gmail.com> added the comment:

Ok, so turns out this was just a stupid bug: we set the __context__ attr only 
if an exception is raised, but not when an exception has been previously 
'cleared'. so the context is filled (by python) with the last exception raised 
which is the outer one.
deleting the 'if last context is an exception' solved it.

This is how I understood it:
the exception's __context__ is set when it's raised and not in its except 
clause, meaning there is no way the outer with is mutating our inner 
exceptions. using pdb I saw the outer exception being explicitly set.

----------
keywords: +patch
Added file: http://bugs.python.org/file25785/14963.3.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14969>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to