[Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

Antoine Pitrou solipsis at pitrou.net
Thu Feb 19 22:56:18 CET 2009


Hello,

<rdmurray <at> bitdance.com> writes:
> 
> Since the 'pipe' comment is an XXX, it is not clear that my use case
> is covered.  However, the actual implementation of readinto seems to
> only call 'read' once, so as long as the 'read' of the subclass returns
> whatever bytes are available, then it looks good to me :)

The only thing I can say is that it should work as you expect it to.
But it would be great if you could give it a try and share your observations
with us. We haven't had many people report on real-world uses of the new IO
library (although we could optimistically deduce from it that people aren't
having any problems, except for the speed issue).

Regards

Antoine.




More information about the Python-Dev mailing list