[Python-ideas] Is there a reason why file.readlines() doesn't/can't return an iterator?

Amaury Forgeot d'Arc amauryfa at gmail.com
Wed Nov 30 14:54:30 CET 2011


2011/11/30 Eli Bendersky <eliben at gmail.com>

> linesgen = (line for line in file)
>

Shorter::
    iter(file)

-- 
Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20111130/1084e6d3/attachment.html>


More information about the Python-ideas mailing list