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 pitrou
Recipients ncoghlan, pitrou
Date 2011-10-15.23:34:29
SpamBayes Score 0.0053464114
Marked as misclassified No
Message-id <1318721670.51.0.393760482816.issue13188@psf.upfronthosting.co.za>
In-reply-to
Content
In the following code, the original traceback attached to the exception thrown into the generator is ignored:

def gen():
    try:
        yield
    except:
        raise

g = gen()
try:
    1/0
except ZeroDivisionError as v:
    g.throw(v)


But if you replace the last line with:

    g.throw(type(v), v, v.__traceback__)

then the original traceback gets appended.
g.throw() should have fetched the __traceback__ attribute by itself.
History
Date User Action Args
2011-10-15 23:34:30pitrousetrecipients: + pitrou, ncoghlan
2011-10-15 23:34:30pitrousetmessageid: <1318721670.51.0.393760482816.issue13188@psf.upfronthosting.co.za>
2011-10-15 23:34:29pitroulinkissue13188 messages
2011-10-15 23:34:29pitroucreate