[New-bugs-announce] [issue44541] collections.abc.Sequence index implementation

Maciej Kopeć report at bugs.python.org
Wed Jun 30 12:24:29 EDT 2021


New submission from Maciej Kopeć <maciejpkopec at gmail.com>:

Hello,

https://github.com/python/cpython/blob/3.9/Lib/_collections_abc.py#L1012
Shouldn't the loop condition be i <= 0 not i < 0? The implementation now is causing not to search in 1-element sequences, since it raises ValueError. Please let me know if this is the expected behaviour.

Kind regards,
Maciej Kopeć

----------
messages: 396783
nosy: LordVilgefortz
priority: normal
severity: normal
status: open
title: collections.abc.Sequence index implementation
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44541>
_______________________________________


More information about the New-bugs-announce mailing list