A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-July/007722.html below:

[Python-Dev] SET_LINENO and python options

[Python-Dev] SET_LINENO and python options [Python-Dev] SET_LINENO and python optionsSkip Montanaro skip@mojam.com (Skip Montanaro)
Mon, 31 Jul 2000 17:07:02 -0500 (CDT)
    amk> It always seemed odd to me that the current line number is always
    amk> kept up to date, even though 99.999% of the time, no one will care.
    amk> Why not just keep a small table that holds the offset in the
    amk> bytecode at which each line starts, and look it up when it's
    amk> needed?

(I'm probably going to wind up seeming like a fool, responding late to this
thread without having read it end-to-end, but...)

Isn't that what the code object's co_lnotab is for?  I thought the idea was
to dispense with SET_LINENO altogether and just compute line numbers using
co_lnotab on those rare occasions (debugging, tracebacks, etc) when you
needed them.

Skip



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4