File iteration in 2.2

Skip Montanaro skip at
Wed Aug 28 19:10:17 CEST 2002

    Clarence> Your argument rests on the assertion "file iterators are
    Clarence> really intended work like the F.xreadlines() method". 

I will direct interested parties to a very long thread in Python-Dev during
July.  Start here:

and search for "Single- vs. Multi-pass iterability".  I think what it boils
down to is you shouldn't try too hard to pretend files are sequences.
Iteration is fine, but you can't "start over".

Skip Montanaro
skip at

More information about the Python-list mailing list