Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(35)

Unified Diff: Lib/trace.py

Issue 20103: http://bugs.python.org/issue2459 -- speed up loops SVN Base: http://svn.python.org/view/*checkout*/python/trunk/
Patch Set: Created 9 months, 1 week ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: Lib/trace.py
===================================================================
--- Lib/trace.py (revision 70087)
+++ Lib/trace.py (working copy)
@@ -377,7 +377,8 @@
"""Return dict where keys are lines in the line number table."""
linenos = {}
- line_increments = [ord(c) for c in code.co_lnotab[1::2]]
+ line_increments = [c if c < 128 else c - 256
+ for c in map(ord, code.co_lnotab[1::2])]
table_length = len(line_increments)
docstring = False

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497