On 12.08.20 10:37, 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__.
Not all iterators need to be finite. E.g. `it.islice(it.count(), 5, None)` skips the first five elements but is yet infinite, so it doesn't have a length. _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/RN3QYVZYJLMIELAA36XXK3GZXPUYMTNO/ Code of Conduct: http://python.org/psf/codeofconduct/
