[Python-Dev] SET_LINENO and python options
Guido van Rossum
guido@beopen.com
Sun, 30 Jul 2000 09:02:38 -0500
> Hasn't backward compatibility already been broken for 2.0? So why not
> break it a little more?
Sure -- within reason.
> It always seemed odd to me that the current line number is always kept
> up to date, even though 99.999% of the time, no one will care. Why
> not just keep a small table that holds the offset in the bytecode at
> which each line starts, and look it up when it's needed?
That already exists. Search for co_lnotab, and for PyCode_Addr2Line().
--Guido van Rossum (home page: http://www.pythonlabs.com/~guido/)