[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-13 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: I've had a very hard time adding to the doc in a way that elucidates rather than further obfuscating; see if you like this patch. -- keywords: +patch nosy: +emptysquare Added file: http://bugs.python.org/file38916/issue23915.patch ___

[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-12 Thread R. David Murray
R. David Murray added the comment: Yes, a doc note would be a good idea, I think. -- assignee: -> docs@python components: +Documentation nosy: +docs@python resolution: not a bug -> status: closed -> open versions: -Python 3.2, Python 3.3, Python 3.6 __

[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-12 Thread Travis A. Everett
Travis A. Everett added the comment: Thanks, Martin--I should've thought to check to see if it'd just been pushed back in the list. I was just focusing on a workaround for another problem and did a double-take when the traceback value didn't match what was set. This resolution is fine by me, b

[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-12 Thread R. David Murray
R. David Murray added the comment: Oh,of course. This issue was bugging the back of my brain after I commented on it, but I hadn't circled back to figure it out. Thanks, Martin, I'll close this as not a bug. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-11 Thread Martin Panter
Martin Panter added the comment: My understanding is that the traceback is a linked list. Every time the exception is raised into a calling function or exception handler, a new traceback object is inserted at the front of the list. Your original traceback is not overwritten, it is just pushed

[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-11 Thread R. David Murray
R. David Murray added the comment: With_traceback's original oupose is now served by chained tracebacks and 'from'. However, it is documented to work so it ought to :) -- nosy: +r.david.murray ___ Python tracker

[issue23915] traceback set with BaseException.with_traceback() overwritten on raise

2015-04-11 Thread Travis A. Everett
New submission from Travis A. Everett: 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,