Skip to content

Commit b5cedd0

Browse files
bpo-44227: Update bisect docstrings (GH-26548) (GH-26563)
1 parent 3b87137 commit b5cedd0

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Modules/_bisectmodule.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ _bisect.bisect_right -> Py_ssize_t
7373
Return the index where to insert item x in list a, assuming a is sorted.
7474
7575
The return value i is such that all e in a[:i] have e <= x, and all e in
76-
a[i:] have e > x. So if x already appears in the list, i points just
77-
beyond the rightmost x already there
76+
a[i:] have e > x. So if x already appears in the list, a.insert(i, x) will
77+
insert just after the rightmost x already there.
7878
7979
Optional args lo (default 0) and hi (default len(a)) bound the
8080
slice of a to be searched.
@@ -83,7 +83,7 @@ slice of a to be searched.
8383
static Py_ssize_t
8484
_bisect_bisect_right_impl(PyObject *module, PyObject *a, PyObject *x,
8585
Py_ssize_t lo, Py_ssize_t hi, PyObject *key)
86-
/*[clinic end generated code: output=3a4bc09cc7c8a73d input=1313e9ca20c8bc3c]*/
86+
/*[clinic end generated code: output=3a4bc09cc7c8a73d input=40fcc5afa06ae593]*/
8787
{
8888
return internal_bisect_right(a, x, lo, hi, key);
8989
}
@@ -199,8 +199,8 @@ _bisect.bisect_left -> Py_ssize_t
199199
Return the index where to insert item x in list a, assuming a is sorted.
200200
201201
The return value i is such that all e in a[:i] have e < x, and all e in
202-
a[i:] have e >= x. So if x already appears in the list, i points just
203-
before the leftmost x already there.
202+
a[i:] have e >= x. So if x already appears in the list, a.insert(i, x) will
203+
insert just before the leftmost x already there.
204204
205205
Optional args lo (default 0) and hi (default len(a)) bound the
206206
slice of a to be searched.
@@ -209,7 +209,7 @@ slice of a to be searched.
209209
static Py_ssize_t
210210
_bisect_bisect_left_impl(PyObject *module, PyObject *a, PyObject *x,
211211
Py_ssize_t lo, Py_ssize_t hi, PyObject *key)
212-
/*[clinic end generated code: output=70749d6e5cae9284 input=3cbeec690f2f6c6e]*/
212+
/*[clinic end generated code: output=70749d6e5cae9284 input=90dd35b50ceb05e3]*/
213213
{
214214
return internal_bisect_left(a, x, lo, hi, key);
215215
}

Modules/clinic/_bisectmodule.c.h

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)