[issue4263] BufferedWriter non-blocking overage

Antoine Pitrou report at bugs.python.org
Wed Dec 31 13:47:08 CET 2008


Antoine Pitrou <pitrou at free.fr> added the comment:

> The comment is misleading because in fact no byte is written at raw
> level. That's because the data size is smaller than the buffer size and
> the buffer is empty (was emptied by the last write call).

It depends on the implementation. A different implementation may use a
different algorithm.

> I also think this is the
> correct behavior regardless of implementation language of BufferedWriter
> class i.e. no write call should write at raw level smaller chunks of
> data than buffer's size unless it has to.

But how do you decide when it "has to"? Unless you want to constrain the
exact implemented algorithm, you can't do that in your tests.

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


More information about the Python-bugs-list mailing list