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: http://members.dsl-only.net/~daniels/ilines.html If people think this is a good idea, I could turn it into an itertools patch. -- -Scott David Daniels Scott.Daniels@Acm.Org
As some of you may have guessed/noticed this is a repeat of a previous message. Sorry about that. After a couple of days I decided that my first message had gone into a junk mail filter. To add a bit, this is now cookbook recipe #286165 <http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286165> Sorry for the bandwidth waste. -Scott
participants (1)
-
Scott David Daniels