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.

Author njs
Recipients abarry, benjamin.peterson, gvanrossum, njs, vstinner, yselivanov
Date 2017-02-17.11:55:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I disagree with the stated reason for closing this, because in general, implicit context chaining doesn't care about where the exception was instantiated, only where it was raised. For example:

err = ValueError()
    raise KeyError
except Exception:
    raise err


Traceback (most recent call last):
  File "/tmp/", line 3, in <module>
    raise KeyError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/", line 5, in <module>
    raise err

I would expect 'gen.throw(OBJ)' to be equivalent to doing 'raise OBJ' inside the generator, and raise does set __context__.
Date User Action Args
2017-02-17 11:55:09njssetrecipients: + njs, gvanrossum, vstinner, benjamin.peterson, yselivanov, abarry
2017-02-17 11:55:09njssetmessageid: <>
2017-02-17 11:55:09njslinkissue25683 messages
2017-02-17 11:55:09njscreate