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 abathur
Recipients abathur
Date 2015-04-11.16:29:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1428769760.16.0.251757749986.issue23915@psf.upfronthosting.co.za>
In-reply-to
Content
When BaseException.with_traceback(tb) is used, the __traceback__ property is properly set, but the property gets overwritten when the exception is raised. 

The attached file demonstrates the issue by raising exception a, which doesn't use with_traceback, and exception b, which uses with_traceback(a.__traceback__). It also demonstrates that the exception object can't observe this change. Executing the attached file produces output like:

a.__traceback__ before raise: [None]
a.__traceback__ after raise : [<traceback object at 0x7f95c5a21708>]
b.__traceback__ before raise: [<traceback object at 0x7f95c5a21708>]
b.__traceback__ after raise : [<traceback object at 0x7f95c5a21748>]
History
Date User Action Args
2015-04-11 16:29:20abathursetrecipients: + abathur
2015-04-11 16:29:20abathursetmessageid: <1428769760.16.0.251757749986.issue23915@psf.upfronthosting.co.za>
2015-04-11 16:29:20abathurlinkissue23915 messages
2015-04-11 16:29:19abathurcreate