Author: Ronan Lamy <[email protected]>
Branch: py3.5
Changeset: r93071:43c4fa3bea61
Date: 2017-11-17 17:05 +0000
http://bitbucket.org/pypy/pypy/changeset/43c4fa3bea61/
Log: Line numbers start from 1
diff --git a/pypy/interpreter/pyparser/error.py
b/pypy/interpreter/pyparser/error.py
--- a/pypy/interpreter/pyparser/error.py
+++ b/pypy/interpreter/pyparser/error.py
@@ -22,7 +22,7 @@
"""(filename, lineno):
try:
with open(filename) as f:
- for _ in range(lineno):
+ for _ in range(lineno - 1):
f.readline()
return f.readline()
except: # we can't allow any exceptions here!
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit