Movatterモバイル変換
[0]ホーム
[Python-Dev] Why do we need Traceback Objects?
Christian Tismertismer@tismer.com
Thu, 06 Apr 2000 17:16:16 +0200
Vladimir Marangozov wrote:>> [Christian]> > > When I look into tracebacks, it turns out to be just a chain> > > like the frame chain, but upward down. It holds references> > > to the frames in a 1-to-1 manner, and it keeps copies of> > > f->f_lasti and f->f_lineno. I don't see why this is needed.> > > ...> > > Does this make sense? Do I miss something?> >>> [Guido]> > Yes. It is quite possible to have multiple stack traces lingering> > around that all point to the same stack frames.>> This reminds me that some time ago I made an experimental patch for> removing SET_LINENO. There was the problem of generating callbacks> for pdb (which I think I solved somehow but I don't remember the> details). I do remember that I had to look at pdb again for some> reason. Is there any interest in reviving this idea?This is a very cheap opcode (at least in my version).What does it buy? Can you drop the f_lineno fieldfrom frames, and calculate it for the frame's f_linenoattribute?-- Christian Tismer :^) <mailto:tismer@appliedbiometrics.com>Applied Biometrics GmbH : Have a break! Take a ride on Python'sKaunstr. 26 : *Starship*http://starship.python.net14163 Berlin : PGP key ->http://wwwkeys.pgp.netPGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF where do you want to jump today?http://www.stackless.com
[8]ページ先頭