Vikash Raja Samuel Selvin added the comment:
Thanks for your comments. Just to make sure I understood correctly, even though
something like bisect.bisect_right(l, 5.1, 0, -2) [This returns 0 which is
wrong] is allowed, since it is not common / intended it is ok to not check for
negative
New submission from Vikash Raja Samuel Selvin :
>>> bisect.bisect_right(l, 5.1, -1)
Traceback (most recent call last):
File "", line 1, in
ValueError: lo must be non-negative
>>> l
[0, 1, 2, 3, 4, 5, 5, 5, 6, 7, 8, 9]
>>> bisect.bisect_right(l, 5.1, 0,