summaryrefslogtreecommitdiff
path: root/Lib/bisect.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2017-02-09 16:09:03 +0100
committerNick Coghlan <ncoghlan@gmail.com>2017-02-09 16:09:03 +0100
commit2a1d833d5da7fa7a01a2eef183b0a208ed019427 (patch)
tree8da3ebb695ae55c69d0a58691403fb13d96a9476 /Lib/bisect.py
parentc6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (diff)
parentbbd3587a29510bd5a318e0a19fc8570c0cd3b622 (diff)
downloadcpython-2a1d833d5da7fa7a01a2eef183b0a208ed019427.tar.gz
Merge issue #26355 fix from 3.6
Diffstat (limited to 'Lib/bisect.py')
-rw-r--r--Lib/bisect.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/bisect.py b/Lib/bisect.py
index 4a4d05255e..7732c639e3 100644
--- a/Lib/bisect.py
+++ b/Lib/bisect.py
@@ -19,8 +19,6 @@ def insort_right(a, x, lo=0, hi=None):
else: lo = mid+1
a.insert(lo, x)
-insort = insort_right # backward compatibility
-
def bisect_right(a, x, lo=0, hi=None):
"""Return the index where to insert item x in list a, assuming a is sorted.
@@ -42,8 +40,6 @@ def bisect_right(a, x, lo=0, hi=None):
else: lo = mid+1
return lo
-bisect = bisect_right # backward compatibility
-
def insort_left(a, x, lo=0, hi=None):
"""Insert item x in list a, and keep it sorted assuming a is sorted.
@@ -90,3 +86,7 @@ try:
from _bisect import *
except ImportError:
pass
+
+# Create aliases
+bisect = bisect_right
+insort = insort_right