[Python-Dev] Small question about BufferedRandom spec (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Mon Jan 5 21:01:37 CET 2009


Hello,

Amaury (mainly) and I are rewriting the IO stack in C, and there is a small thing in PEP 3116 about the BufferedRandom object that I'd like to clarify:

« Q: Do we want to mandate in the specification that switching between reading and writing on a read-write object implies a .flush()? Or is that an implementation convenience that users should not rely on? »

Is it ok if I assume that the answer is "it is an implementation convenience that users should not rely on"? The reason is that I'm overhauling BufferedRandom objects to use a single shared buffer, so as to optimize interleaved reads and writes.

Thanks

Antoine.



More information about the Python-Dev mailing list