[Python-checkins] r65765 - python/branches/tlee-ast-optimize/Lib/dis.py

thomas.lee python-checkins at python.org
Sun Aug 17 15:51:24 CEST 2008


Author: thomas.lee
Date: Sun Aug 17 15:51:24 2008
New Revision: 65765

Log:
Fix an error made while porting over the lnotab logic.

Modified:
   python/branches/tlee-ast-optimize/Lib/dis.py

Modified: python/branches/tlee-ast-optimize/Lib/dis.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/dis.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/dis.py	Sun Aug 17 15:51:24 2008
@@ -176,11 +176,8 @@
 
 def findlinestarts(code):
     """Find the offsets in a byte code which are start of lines in the source.
-
-    Generate pairs (offset, lineno) as described in Python/compile.c.
-
     """
-    lastline = None
+    lastline = code.co_firstlineno
     for addr, line in code.co_lnotab:
         if line != lastline:
             yield (addr, line)


More information about the Python-checkins mailing list