[Python-Dev] Traceback problem

Christian Tismer tismer@tismer.com
Wed, 26 Feb 2003 01:17:31 +0100


Kevin Jacobs wrote:
> On Tue, 25 Feb 2003, Christian Tismer wrote:
> 
>>We just want to clear the current exception in tstate,
>>and I think your code does the right thing.
>>
>>+1
> 
> 
> Thanks for checking through the logic.
> 
> 
>>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. 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).

Saving and restoring things in the callee which belong
to the caller just doesn't look very clean, and I now
also understand certain problems with old Stackless,
where this probably caused errors which were never resolved,
simply because I didn't understand this.

ciao - 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/