Raymond Hettinger <[email protected]> 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 <[email protected]>
<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