[Python-Dev] Traceback problem

Christian Tismer tismer@tismer.com
Wed, 26 Feb 2003 03:19:40 +0100


Kevin Jacobs wrote:
> On Wed, 26 Feb 2003, Christian Tismer wrote:
> 
>>>>p.s.: I would probably have done the exception saving
>>>>in the caller's frame, where it belongs, IMHO.
>>>
>>>I'm going to see if this is feasible.  The current method is almost
>>>certainly more efficient, but seems very backwards.
>>
>>No, I didn't refer to your code, but just to the
>>implementation of (re)set_exc_info.
> 
> 
> Actually, we're on the same page.

I understand.

>>I would have understood this much easier, if the saved exception were
>>saved in the caller's frame. I'm not proposing a change, but maybe a
>>comment, why this must be saved. Yes, probably it is most efficient to do
>>it as it is. (Although functions called in an exception context are
>>probably not the normal case which needs to be optimal).
> 
> 
> Exactly.  This is why I'm fairly certain that nobody looks at the
> frame.f_exc_* values, since they make no sense in the context of that frame.
> It should be trivial to dereference the traceback to find the generating
> frame and stow the values there.

Yeah, but Guido had some point there, which I still
have to investigate. I'm not quite sure, yet.
Will get back to it in the other thread.

cheers - chris

-- 
Christian Tismer             :^)   <mailto:tismer@tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/