diff options
author | Raymond Hettinger <python@rcn.com> | 2004-01-05 10:13:35 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-01-05 10:13:35 (GMT) |
commit | 0c4102760c440af3e7b575b0fd27fe25549641a2 (patch) | |
tree | d7cb942e0f91852f6a2beb8a7bf17c69bbc75e23 /Lib/bisect.py | |
parent | 23a0f4ed21205a0b585ee66bd8e1405b38680319 (diff) | |
download | cpython-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.py | 6 |
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 |