[Python-3000] Draft PEP for New IO system

Daniel Stutzbach agthorr at barsoom.org
Wed Feb 28 15:24:21 CET 2007


On 2/28/07, Jean-Paul Calderone <exarkun at divmod.com> wrote:
> >On EOF, they return a length-0 object or 0 instead.  If the user tries
> >to read again *after* hitting EOF, then an EOFError is raised.
>
> What is the motivation for having two different ways to signal EOF?  How
> is this case handled?

I checked how Python 2.5 handles this, and you're right.  Read
operations should continue to return 0 bytes if the user keeps trying
to read at EOF.  Not sure what I was thinking.

-- 
Daniel Stutzbach, Ph.D.             President, Stutzbach Enterprises LLC


More information about the Python-3000 mailing list