[New-bugs-announce] [issue40832] hi param in bisect module should not accept negative values
Vikash Raja Samuel Selvin
report at bugs.python.org
Sun May 31 03:16:01 EDT 2020
New submission from Vikash Raja Samuel Selvin <selvin.samuel2 at gmail.com>:
>>> bisect.bisect_right(l, 5.1, -1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
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, -2)
0
In order to be consistent with the behavior for lo and not return wrong answers when hi is provided with a negative value
----------
components: Library (Lib)
messages: 370416
nosy: samuel72
priority: normal
severity: normal
status: open
title: hi param in bisect module should not accept negative values
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40832>
_______________________________________
More information about the New-bugs-announce
mailing list