diff options
author | Raymond Hettinger <python@rcn.com> | 2007-04-03 00:01:09 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2007-04-03 00:01:09 +0000 |
commit | 6a390b34b72cbffdea2115f5e2594895dbbd5c09 (patch) | |
tree | 1315382cf39b51e5f07e04c3e32b2858a4c64bd0 | |
parent | d6030acd7f974fc8595b514032e1801e68fec300 (diff) | |
download | cpython-git-6a390b34b72cbffdea2115f5e2594895dbbd5c09.tar.gz |
SF 1602378 Clarify docstrings for bisect
-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 152f6c7854..e4a21336f8 100644 --- a/Lib/bisect.py +++ b/Lib/bisect.py @@ -23,8 +23,8 @@ def bisect_right(a, x, lo=0, hi=None): """Return the index where to insert item x in list a, assuming a is sorted. The return value i is such that all e in a[:i] have e <= x, and all e in - a[i:] have e > x. So if x already appears in the list, i points just - beyond the rightmost x already there. + a[i:] have e > x. So if x already appears in the list, a.insert(x) will + insert just after the rightmost x already there. Optional args lo (default 0) and hi (default len(a)) bound the slice of a to be searched. @@ -62,8 +62,8 @@ def bisect_left(a, x, lo=0, hi=None): """Return the index where to insert item x in list a, assuming a is sorted. The return value i is such that all e in a[:i] have e < x, and all e in - a[i:] have e >= x. So if x already appears in the list, i points just - before the leftmost x already there. + a[i:] have e >= x. So if x already appears in the list, a.insert(x) will + insert just before the leftmost x already there. Optional args lo (default 0) and hi (default len(a)) bound the slice of a to be searched. |