diff options
author | Guido van Rossum <guido@python.org> | 2001-09-04 19:14:14 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-09-04 19:14:14 (GMT) |
commit | 54e54c6877329e105406c48490f218faff59db39 (patch) | |
tree | 6bbdf1f6efaa2253af424f59dc9564a5458d6739 /Lib/bisect.py | |
parent | b8f22749853cf79bfbe3709309e67d1a448f4cab (diff) | |
download | cpython-54e54c6877329e105406c48490f218faff59db39.zip cpython-54e54c6877329e105406c48490f218faff59db39.tar.gz cpython-54e54c6877329e105406c48490f218faff59db39.tar.bz2 |
The first batch of changes recommended by the fixdiv tool. These are
mostly changes of / operators into //. Once or twice I did more or
less than recommended.
Diffstat (limited to 'Lib/bisect.py')
-rw-r--r-- | Lib/bisect.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/bisect.py b/Lib/bisect.py index d311337..c9e6c60 100644 --- a/Lib/bisect.py +++ b/Lib/bisect.py @@ -12,7 +12,7 @@ def insort_right(a, x, lo=0, hi=None): if hi is None: hi = len(a) while lo < hi: - mid = (lo+hi)/2 + mid = (lo+hi)//2 if x < a[mid]: hi = mid else: lo = mid+1 a.insert(lo, x) @@ -33,7 +33,7 @@ def bisect_right(a, x, lo=0, hi=None): if hi is None: hi = len(a) while lo < hi: - mid = (lo+hi)/2 + mid = (lo+hi)//2 if x < a[mid]: hi = mid else: lo = mid+1 return lo @@ -52,7 +52,7 @@ def insort_left(a, x, lo=0, hi=None): if hi is None: hi = len(a) while lo < hi: - mid = (lo+hi)/2 + mid = (lo+hi)//2 if a[mid] < x: lo = mid+1 else: hi = mid a.insert(lo, x) @@ -72,7 +72,7 @@ def bisect_left(a, x, lo=0, hi=None): if hi is None: hi = len(a) while lo < hi: - mid = (lo+hi)/2 + mid = (lo+hi)//2 if a[mid] < x: lo = mid+1 else: hi = mid return lo |