]> granicus.if.org Git - python/commit
remove spurious SET_LINENO from com_list_for and com_list_if. All they do
authorSkip Montanaro <skip@pobox.com>
Thu, 25 Jul 2002 06:18:42 +0000 (06:18 +0000)
committerSkip Montanaro <skip@pobox.com>
Thu, 25 Jul 2002 06:18:42 +0000 (06:18 +0000)
commit21ee37c94e78e43adabf178c53401cebde4ce96f
tree942c0688a42489b03a344040e3d2b439f081bb6b
parentf8c8cf8a9d8b9136571b65e82f95e136fd0374e8
remove spurious SET_LINENO from com_list_for and com_list_if.  All they do
is slow things down unnecessarily and make tracing much more verbose.
Something like

    def f(n):
return [i for i in range(n) if i%2]

should have at most two SET_LINENO instructions, not four.  When tracing,
the current line number should be printed once, not 2*n+1 times.
Python/compile.c