On Wed, Aug 12, 2020 at 8:49 AM David Mertz <me...@gnosis.cx> wrote:

> 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.
>

I think islice should implement __length_hint__, though. As of 3.8.5 it
doesn't.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/KSGNEU7FMZ7LV6Z6HI7TRWBBDEUC6VXX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to