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
Thanks! I reported this at https://github.com/python/cpython/issues/96179 On 02. 08. 22 21:34, James Skelton wrote:
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_leftand using that instead.
Thanks for your efforts in maintaining the Python docs!
Best wishes, James Skelton
_______________________________________________ docs mailing list -- docs@python.org To unsubscribe send an email to docs-leave@python.org https://mail.python.org/mailman3/lists/docs.python.org/ Member address: encukou@gmail.com
participants (2)
-
James Skelton
-
Petr Viktorin