]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-96179: Fix misleading example on the bisect documentation (GH-96228)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 24 Aug 2022 15:55:45 +0000 (08:55 -0700)
committerGitHub <noreply@github.com>
Wed, 24 Aug 2022 15:55:45 +0000 (08:55 -0700)
The `movies[bisect(movies, 1960, key=by_year)]` will actually return only movies **after** 1960.
(cherry picked from commit 4317b25a2323ae4be04574e45de0e335c571c463)

Co-authored-by: prego <pedropregueiro@gmail.com>
Doc/library/bisect.rst
Misc/ACKS

index 513675d3685a52001c7691abc8b85180e63c95ab..c2927c1ebd0e1bce3c061169a5d1c909e4df8de8 100644 (file)
@@ -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)]
index 8726c0f6e6286d85fc2bc5b1950daeb74569b9cb..fc1dcafcc852680e51ca43fe77d2a86375cf554b 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1405,6 +1405,7 @@ John Popplewell
 Matheus Vieira Portela
 Davin Potts
 Guillaume Pratte
+Pedro Pregueiro
 Florian Preinstorfer
 Alex Prengère
 Amrit Prem