Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

Perhaps the indices() method will suffice:

    >>> slice(None, 10, 2).indices(8)
    (0, 8, 2)

    >>> range(8)[:10:2]
    range(0, 8, 2)

----------
nosy: +rhettinger

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42956>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to