On Sat, 4 Jun 2022 at 09:39, Steve Jorgensen <ste...@stevej.name> wrote:
>
> I was using the reading of lines from a file as a contrived example. There 
> are many other possible cases such as de-structuring from iterator such as 
> `itertools.repeat()` with no `count` argument which will generate values 
> endlessly.

itertools.islice will (in effect) allow you to have a count argument
for any iterator.

Paul
_______________________________________________
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/NRDAL4ZMLLGCH6ZLI26LLMMH7ZITCQIV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to