[Python-Dev] with_traceback (original) (raw)

Shane Holloway shane.holloway at ieee.org
Wed Feb 28 18:43:02 CET 2007


On Feb 28, 2007, at 1:50 AM, Andrew Dalke wrote:

Glyph:

This seems like kind of a strange micro-optimization to have an impact on a language change discussion. Just as a reminder, my concern is that people reuse exceptions (rarely) and that the behavior of the "withexceptions()" method is ambiguous when that happens. It has nothing to do with optimization. The two solutions of: 1. always replace an existing traceback 2. never replace an existing traceback both seem to lead to problems.

I may be strange, or in left field, or both. Since the traceback is
the object that is always created, it would seem natural to me that
the traceback have a reference to the exception and not the other way
around. It would also seem to be a good place to attach a nested
traceback which intern has it's own reference to its exception. I
never really thought about it when they were just peer objects
traveling up the stack.

Just an idea from a different seat ;) -Shane Holloway



More information about the Python-Dev mailing list