Skip to content

Minor error in bisect documentation #96179

Closed
@encukou

Description

@encukou

Reposting from the docs list:

Hi,

The bisect library documentation includes an example with movies that is
stated to "find the first movie released on or after 1960". The example
given uses bisect.bisect, which is an alias for bisect.bisect_right, and so
will find the first move released after 1960. This can be verified by
adding in a movie from 1960.

The example can be corrected by either:

  1. Changing the comment to "Find the first movie released after 1960"
  2. Importing bisect_left and using that instead.

Thanks for your efforts in maintaining the Python docs!

Best wishes,
James Skelton

@rhettinger, you added the example in #92602 – which would you prefer?

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc direasy

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions