summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2017-01-02 04:09:18 (GMT)
committerBenjamin Peterson <benjamin@python.org>2017-01-02 04:09:18 (GMT)
commiteb62be12f05cfce17f09709b4340a8a24dd0a1b5 (patch)
tree8143b6abb631bd26ab8750cdc0737d2e9d585201 /Lib/inspect.py
parent5848e72ee1f85354b023b19b83c88ba57d39b6d0 (diff)
parent01debaccdd1042ecff474637bd8905d6ec3efd60 (diff)
downloadcpython-eb62be12f05cfce17f09709b4340a8a24dd0a1b5.zip
cpython-eb62be12f05cfce17f09709b4340a8a24dd0a1b5.tar.gz
cpython-eb62be12f05cfce17f09709b4340a8a24dd0a1b5.tar.bz2
merge heads
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index e08e9f5..ba7a913 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -1416,7 +1416,7 @@ def getframeinfo(frame, context=1):
except OSError:
lines = index = None
else:
- start = max(start, 1)
+ start = max(start, 0)
start = max(0, min(start, len(lines) - context))
lines = lines[start:start+context]
index = lineno - 1 - start