[issue44541] collections.abc.Sequence index implementation

2021-06-30 Thread Maciej Kopeć

New submission from Maciej Kopeć :

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 
<https://bugs.python.org/issue44541>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44541] collections.abc.Sequence index implementation

2021-06-30 Thread Maciej Kopeć

Maciej Kopeć  added the comment:

Sorry for the hastily posted issue, when stop is not given this should work 
properly, and since stop is exclusive in python, this shall be expected 
behaviour.

--
resolution:  -> not a bug

___
Python tracker 
<https://bugs.python.org/issue44541>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com