Mallika Bachan added the comment:
Conceptually, yes, but the function does return an index, and values are
stored at these indices. The index it returns holds the leftmost occurrence
of the target (should the target exist)
>>> bisect.bisect_left([1,2,2,3],2)
1
If we insert at t
Change by Mallika Bachan :
--
keywords: +patch
pull_requests: +24933
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26340
___
Python tracker
<https://bugs.python.org/issu
New submission from Mallika Bachan :
Documentation issue.
help(bisect.bisect_left)
says: "... if x already appears in the list, i points just before the leftmost
x already there."
but in fact, it actually points *to* the leftmost x already there
--
messages: 3