summaryrefslogtreecommitdiffstats
path: root/Lib/bisect.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-01-05 10:13:35 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-01-05 10:13:35 (GMT)
commit0c4102760c440af3e7b575b0fd27fe25549641a2 (patch)
treed7cb942e0f91852f6a2beb8a7bf17c69bbc75e23 /Lib/bisect.py
parent23a0f4ed21205a0b585ee66bd8e1405b38680319 (diff)
downloadcpython-0c4102760c440af3e7b575b0fd27fe25549641a2.zip
cpython-0c4102760c440af3e7b575b0fd27fe25549641a2.tar.gz
cpython-0c4102760c440af3e7b575b0fd27fe25549641a2.tar.bz2
SF Patch #864863: Bisect C implementation
(Contributed by Dmitry Vasiliev.)
Diffstat (limited to 'Lib/bisect.py')
-rw-r--r--Lib/bisect.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/bisect.py b/Lib/bisect.py
index c9e6c60..152f6c7 100644
--- a/Lib/bisect.py
+++ b/Lib/bisect.py
@@ -76,3 +76,9 @@ def bisect_left(a, x, lo=0, hi=None):
if a[mid] < x: lo = mid+1
else: hi = mid
return lo
+
+# Overwrite above definitions with a fast C implementation
+try:
+ from _bisect import bisect_right, bisect_left, insort_left, insort_right, insort, bisect
+except ImportError:
+ pass