[Python-3000] Draft PEP for New IO system

Guido van Rossum guido at python.org
Sun Mar 25 17:46:57 CEST 2007


You're not supposed to do that. I guess the PEP is unclear about that,
but the effect would (as you understand) depend intricately on the
internal state of the BufferedIO object, and while on the one hand I
want the BufferedIO object to be more transparent than a C stdio
object, on the other hand I don't want to force it into a particular
implementation (I want freedom to evolve it). The PEP ought to be
explicit about this. The relationship between the two is not unlike
that between a C stdio object  and its fileno() -- there are certain
times that the relationship is well-defined (e.g. after a fsync()) and
others that it is not.

--Guido

On 3/25/07, Aahz <aahz at pythoncraft.com> wrote:
> I've looked at the most recent version at
>
> http://python.org/dev/peps/pep-3116/
>
> and I see nothing in there about the interaction between a BufferedIO
> object and its underlying RawIO object.  That is, what happens if you do
> this:
>
>     f = open('foo', buffering=200)
>     f.read(150)
>     f.raw.read(200)
> --
> Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/
>
> "Typing is cheap.  Thinking is expensive."  --Roy Smith
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list