[issue12062] Buffered I/O inconsistent with unbuffered I/O in certain cases

STINNER Victor report at bugs.python.org
Thu May 12 15:45:20 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

open("test.bin", "w+b", buffering=-1) creates a 
BufferedRandom object. In the _pyio module, BufferedRandom overrides the write() method to "undo readahead", whereas the _io module reuses bufferedwriter_write() for bufferedrandom_methods and bufferedwriter_methods.

I suppose that the problem is "just" that _io.BufferedRandom.write() doesn't undo readahead.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12062>
_______________________________________


More information about the Python-bugs-list mailing list