Yury Selivanov added the comment: I now don't think this is a bug.
In the above example, SubError is instantiated outside of `main` generator. It's also thrown *into* `main` from the *outside* scope. And __context__ should be set for exceptions that were originated by the code that was handling other exceptions. Closing this issue with 'not a bug'. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25683> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com