SIGN IN SIGN UP

file_getiter(): make iter(file) be equivalent to file.xreadlines().

This should be faster.

This means:

(1) "for line in file:" won't work if the xreadlines module can't be
    imported.

(2) The body of "for line in file:" shouldn't use the file directly;
    the effects (e.g. of file.readline(), file.seek() or even
    file.tell()) would be undefined because of the buffering that goes
    on in the xreadlines module.
G
Guido van Rossum committed
5b021848ac728b9815d6c5c5b9622d3956665bbb
Parent: d992c2c