New submission from Yury Selivanov: In the below snippet, SubError will propagate with __context__ set to None, instead of MainError. Maybe this isn't a bug?
class MainError(Exception): pass class SubError(Exception): pass def main(): try: raise MainError() except MainError: yield coro = main() coro.send(None) coro.throw(SubError()) ---------- components: Interpreter Core messages: 254994 nosy: benjamin.peterson, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: __context__ for yields inside except clause type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ 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