binding a reference to a variable
Just van Rossum
just at xs4all.nl
Sat Apr 13 14:00:54 EDT 2002
In article <a99q7f$ss6$1 at panix1.panix.com>, aahz at pythoncraft.com (Aahz)
wrote:
> But it *is* silly. That's why we have iterators. One thing I noticed
> recently about how fragile the while 1 idiom is: it depends on
> readline() returning linebreaks. Writing a file-like class for which
> this *isn't* true breaks the idiom.
I'd say it breaks the file protocol, part of which is: if read() or
readline() returns the empty string you're at the end of the file.
Nitpicking, nitpicking...
Just
More information about the Python-list
mailing list