summaryrefslogtreecommitdiff
path: root/Lib/bisect.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-02-04 15:05:50 -0800
committerSteve Dower <steve.dower@microsoft.com>2017-02-04 15:05:50 -0800
commit3b0e4320092ac0504b6670cafaf0301b908c91fc (patch)
treed3be1b6b844d61763bb366fa21ceed475e5703fd /Lib/bisect.py
parentb2fa705fd3887c326e811c418469c784353027f4 (diff)
parentf687fbcd73c14dfcbe086eb5cd94b298f1e81e72 (diff)
downloadcpython-3b0e4320092ac0504b6670cafaf0301b908c91fc.tar.gz
Issue #29392: Prevent crash when passing invalid arguments into msvcrt module.
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