Skip to content
Snippets Groups Projects
Unverified Commit 4317b25a authored by prego's avatar prego Committed by GitHub
Browse files

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.
parent 09563a76
Branches
Tags
No related merge requests found
......@@ -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)]
......
......@@ -1419,6 +1419,7 @@ John Popplewell
Matheus Vieira Portela
Davin Potts
Guillaume Pratte
Pedro Pregueiro
Florian Preinstorfer
Alex Prengère
Amrit Prem
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment