On 3/5/07, Ka-Ping Yee <[EMAIL PROTECTED]> wrote: > In fact, your example was specifically anticipated and addressed in > the PEP draft I posted here. file.read() is not invoked by a language > construct. When file.read() gets called, it is because the calling > code has an explicit call to read() in it, not because the standard > semantics of some piece of Python syntax require it to be invoked.
Except that the "explicit" call could just be "for line in file", which doesn't mention read. And there are warnings not to mix explicit reads with iteration reads, because buffering will cause surprises. I think the inconsistency is in iteration rather than reading, but file.read is affected. -jJ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com