Proposal: make files really support the iterator protocol. __iter__ would return self and next() would call readline and raise StopIteration if ''. If anyone wants the xreadline performance improvement it should be explicit.
No. I won't have "for line in file" be slower than attainable.
The only solution I accept is a complete rewrite of the I/O system without using stdio, so xreadlines can be integrated.
--Guido van Rossum (home page: http://www.python.org/~guido/)