The start/stop/step sound like they might be nice. But that wouldn't give you a length, since you never know when an iterator will be exhausted.  I feel like `len(islice(it, 1, 1_000_000))` telling you the "maximum possible length" is more a danger than a help.

On Wed, Aug 12, 2020 at 4:41 AM Mathew Elman <> wrote:
Is there a reason that itertools.islice does not provide its start, stop and step values as attributes, similar to range?
This seems like a sensible and useful thing to have, and would also allow islice's to have a __len__.

Python-ideas mailing list --
To unsubscribe send an email to
Message archived at
Code of Conduct:

The dead increasingly dominate and strangle both the living and the
not-yet born.  Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.