summaryrefslogtreecommitdiffstats
path: root/Doc/library/bisect.rst
diff options
context:
space:
mode:
authorprego <pedropregueiro@gmail.com>2022-08-24 15:47:13 (GMT)
committerGitHub <noreply@github.com>2022-08-24 15:47:13 (GMT)
commit4317b25a2323ae4be04574e45de0e335c571c463 (patch)
treef134d9b4785525ec51605a0b86e1c8437aebc533 /Doc/library/bisect.rst
parent09563a764ebc54f98087c128419f46cf0822b4b7 (diff)
downloadcpython-4317b25a2323ae4be04574e45de0e335c571c463.zip
cpython-4317b25a2323ae4be04574e45de0e335c571c463.tar.gz
cpython-4317b25a2323ae4be04574e45de0e335c571c463.tar.bz2
GH-96179: Fix misleading example on the bisect documentation (GH-96228)
The `movies[bisect(movies, 1960, key=by_year)]` will actually return only movies **after** 1960.
Diffstat (limited to 'Doc/library/bisect.rst')
-rw-r--r--Doc/library/bisect.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/bisect.rst b/Doc/library/bisect.rst
index 76045ea..7856bf6 100644
--- a/Doc/library/bisect.rst
+++ b/Doc/library/bisect.rst
@@ -216,7 +216,7 @@ records in a table::
... Movie('Aliens', 1986, 'Scott')
... ]
- >>> # Find the first movie released on or after 1960
+ >>> # Find the first movie released after 1960
>>> by_year = attrgetter('released')
>>> movies.sort(key=by_year)
>>> movies[bisect(movies, 1960, key=by_year)]