Message 254815 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
Regarding the second bug, did you consider that the exception thrown to the generator can already have __context__ set?

try:
    try: raise ValueError("Context outside of generator")
    except ValueError as ex: raise SubError() from ex
except SubError as ex:
    coro.throw(ex)  # ex.__context__ is a ValueError

I guess either one context could trump the other, or we could to follow the chain of contexts and append the other chain at the end. Both these ideas seem a bit ugly though.