[Python-Dev] Why do we need Traceback Objects?

Christian Tismer tismer@tismer.com
Wed, 05 Apr 2000 17:01:24 +0200


Guido van Rossum wrote:

[me, about embedding tracebacks into frames]

> > Does this make sense? Do I miss something?
> 
> Yes.  It is quite possible to have multiple stack traces lingering
> around that all point to the same stack frames.

Oh, I see. This is a Standard Python specific thing, which I
was about to forget. In my version, this can happen, too,
unless you are in a continuation-protected context already.
There (and that was what I looked at while debugging), this
situation can never happen, since an exception creates
continuation-copies of all the frames while it crawls up.
Since the traceback causes refcount increase, all the frames
protect themselves.

Thank you. I see it is a stackless feature. I can implement it
if I put protection into the core, not just the co-extension.
Frames can carry the tracebacks under the condition that
they are protected (copied) if the traceback fields are
occupied. Great, since this is a rare condition.

Thanks again for the enlightment - chris

-- 
Christian Tismer             :^)   <mailto:tismer@appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     where do you want to jump today?   http://www.stackless.com