[issue42467] slice().indices() returns incorrect values

Mark Dickinson report at bugs.python.org
Wed Nov 25 16:10:34 EST 2020


Mark Dickinson <dickinsm at gmail.com> added the comment:

This is essentially a duplicate of #11842. In short, slice.indices is working as intended here. It's best to think of slice.indices as start, stop and step arguments that could be provided to the range built-in function to get the set of relevant indices.

----------
nosy: +mark.dickinson
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> slice.indices with negative step and default stop

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


More information about the Python-bugs-list mailing list