Skip to content

Commit 4317b25

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.
1 parent 09563a7 commit 4317b25

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Doc/library/bisect.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ records in a table::
216216
... Movie('Aliens', 1986, 'Scott')
217217
... ]
218218

219-
>>> # Find the first movie released on or after 1960
219+
>>> # Find the first movie released after 1960
220220
>>> by_year = attrgetter('released')
221221
>>> movies.sort(key=by_year)
222222
>>> movies[bisect(movies, 1960, key=by_year)]

Misc/ACKS

+1
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,7 @@ John Popplewell
14191419
Matheus Vieira Portela
14201420
Davin Potts
14211421
Guillaume Pratte
1422+
Pedro Pregueiro
14221423
Florian Preinstorfer
14231424
Alex Prengère
14241425
Amrit Prem

0 commit comments

Comments
 (0)