[Python-checkins] cpython (3.5): Issue #15812: Delete redundant max(start, 0)

berker.peksag python-checkins at python.org
Mon Jan 2 19:46:24 EST 2017


https://hg.python.org/cpython/rev/2b6bdd6cd3f8
changeset:   105969:2b6bdd6cd3f8
branch:      3.5
parent:      105965:1aba7cbbcc27
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Tue Jan 03 03:48:04 2017 +0300
summary:
  Issue #15812: Delete redundant max(start, 0)

Noticed by Serhiy Storchaka.

files:
  Lib/inspect.py |  1 -
  1 files changed, 0 insertions(+), 1 deletions(-)


diff --git a/Lib/inspect.py b/Lib/inspect.py
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -1416,7 +1416,6 @@
         except OSError:
             lines = index = None
         else:
-            start = max(start, 0)
             start = max(0, min(start, len(lines) - context))
             lines = lines[start:start+context]
             index = lineno - 1 - start

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list