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 yak
Recipients Trundle, ezio.melotti, ncoghlan, petri.lehtinen, pitrou, python-dev, yak
Date 2011-10-27.13:54:43
SpamBayes Score 1.0984547e-12
Marked as misclassified No
Message-id <1319723684.0.0.861765437816.issue13188@psf.upfronthosting.co.za>
In-reply-to
Content
I don't think this should be applied to 2.7.

In 2.x, the full exception info consists of the (type, value, traceback)-trio. Programmer is expected to pass this around to retain full exception info. Re-raising just the value (exception instance) using "raise value" starts a fresh traceback. Currently "raise" and gen.throw() behave the same in that regard and there's no reason to change that.

Python 3 reduces the exception info to one object by adding __traceback__ to the exception instance so it's reasonable to expect that "raise" and gen.throw() will be able to extract the full info from just the instance.

"raise" does that today, gen.throw() didn't, hence this bug report.
History
Date User Action Args
2011-10-27 13:54:44yaksetrecipients: + yak, ncoghlan, pitrou, ezio.melotti, Trundle, python-dev, petri.lehtinen
2011-10-27 13:54:43yaksetmessageid: <1319723684.0.0.861765437816.issue13188@psf.upfronthosting.co.za>
2011-10-27 13:54:43yaklinkissue13188 messages
2011-10-27 13:54:43yakcreate