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 back in the list. See my version of the demonstration script. The output is now:
a.__traceback__ before raise : [None] a.__traceback__ after raise : [<traceback object at 0xb6fb3b1c>, None] b.__traceback__ before raise : [<traceback object at 0xb6fb3b1c>, None] b.__traceback__ after raise : [<traceback object at 0xb6fb3b44>, <traceback object at 0xb6fb3b1c>, None] ---------- nosy: +vadmium Added file: http://bugs.python.org/file38902/traceback_list.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23915> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com