Warning about "for line in file:"

Neil Schemenauer nas at python.ca
Fri Feb 15 14:01:59 EST 2002


Russell E. Owen wrote:
> The readline or xreadline file methods work fine, of course.

Why "of course"?  iter(file) does the same thing as file.xreadlines().
Have you tested xreadlines?

  Neil




More information about the Python-list mailing list