who uses Python or Ruby, and for what?

Neil Schemenauer nas at python.ca
Tue May 1 19:11:18 CEST 2001


Bob Alexander wrote:
> Python 2.1    (finally! -- better, shorter, but wierd!)
>   while line in file.xreadlines():
>     <process the line>

In 2.2 you should be able to do:

    for line in file:
        ...

to do the same thing.  Iterators are cool.

  Neil




More information about the Python-list mailing list