GH-96179: Fix misleading example on the bisect documentation (GH-96228)

https://github.com/python/cpython/commit/41e8257449c2c44bbe8fc9577cdf5ba0c54... commit: 41e8257449c2c44bbe8fc9577cdf5ba0c54b867d branch: 3.10 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: miss-islington <31488909+miss-islington@users.noreply.github.com> date: 2022-08-24T08:55:45-07:00 summary: 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. (cherry picked from commit 4317b25a2323ae4be04574e45de0e335c571c463) Co-authored-by: prego <pedropregueiro@gmail.com> files: M Doc/library/bisect.rst M Misc/ACKS diff --git a/Doc/library/bisect.rst b/Doc/library/bisect.rst index 513675d3685..c2927c1ebd0 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)] diff --git a/Misc/ACKS b/Misc/ACKS index 8726c0f6e62..fc1dcafcc85 100644 --- 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
participants (1)
-
miss-islington