[Python-Dev] Another possible itertools candidate

Scott David Daniels Scott.Daniels at Acm.Org
Fri Jun 18 03:25:06 EDT 2004

One candidate for itertools I'd like feedback on is "ilines": a
universal newlines iterator.  The idea is to take an iterator that
produces input blocks and yield lines as universal newlines would
produce them if the reads from a binary-opened file produced the
same blocks.  This allows things like decompression to iterate in
parts rather than perform a full expansion.  It would also make
pseudo-files from zipfile a later possibility.

For the curious, I have a Python version with tests at:


If people think this is a good idea, I could turn it into an
itertools patch.

-Scott David Daniels
Scott.Daniels at Acm.Org

More information about the Python-Dev mailing list