On Sat, 4 Jun 2022 at 09:39, Steve Jorgensen <[email protected]> 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 -- [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/NRDAL4ZMLLGCH6ZLI26LLMMH7ZITCQIV/ Code of Conduct: http://python.org/psf/codeofconduct/
