summaryrefslogtreecommitdiff
path: root/Modules/_bisectmodule.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-06-06 12:52:42 -0700
committerGitHub <noreply@github.com>2021-06-06 12:52:42 -0700
commitb5cedd098043dc58ecf9c2f33774cd7646506a92 (patch)
tree03c450498a9c9f7751a2400627a177285ee6a40f /Modules/_bisectmodule.c
parent3b87137176f790e93493fcb5543001f1cab8daf7 (diff)
downloadcpython-git-b5cedd098043dc58ecf9c2f33774cd7646506a92.tar.gz
bpo-44227: Update bisect docstrings (GH-26548) (GH-26563)
Diffstat (limited to 'Modules/_bisectmodule.c')
-rw-r--r--Modules/_bisectmodule.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c
index 2d7c15bc17..aa63b68560 100644
--- a/Modules/_bisectmodule.c
+++ b/Modules/_bisectmodule.c
@@ -73,8 +73,8 @@ _bisect.bisect_right -> Py_ssize_t
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(i, 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.
@@ -83,7 +83,7 @@ slice of a to be searched.
static Py_ssize_t
_bisect_bisect_right_impl(PyObject *module, PyObject *a, PyObject *x,
Py_ssize_t lo, Py_ssize_t hi, PyObject *key)
-/*[clinic end generated code: output=3a4bc09cc7c8a73d input=1313e9ca20c8bc3c]*/
+/*[clinic end generated code: output=3a4bc09cc7c8a73d input=40fcc5afa06ae593]*/
{
return internal_bisect_right(a, x, lo, hi, key);
}
@@ -199,8 +199,8 @@ _bisect.bisect_left -> Py_ssize_t
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(i, 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.
@@ -209,7 +209,7 @@ slice of a to be searched.
static Py_ssize_t
_bisect_bisect_left_impl(PyObject *module, PyObject *a, PyObject *x,
Py_ssize_t lo, Py_ssize_t hi, PyObject *key)
-/*[clinic end generated code: output=70749d6e5cae9284 input=3cbeec690f2f6c6e]*/
+/*[clinic end generated code: output=70749d6e5cae9284 input=90dd35b50ceb05e3]*/
{
return internal_bisect_left(a, x, lo, hi, key);
}