Antoine Pitrou <pit...@free.fr> added the comment:

> I feel that no matter what implementation algorithm BufferedWriter uses
> it shouldn't write smaller chunks of data than buffer's size or else the
> buffer is useless.

If you rewrite the above sentence using the word "statistically", then I
can agree :)
But if I look at e.g. the fwrite() manpage, I see no guarantee that the
stdio layer will never make a call to write() with a size smaller than
the buffer size. The buffered layer should be free to manage its buffer
in what it believes is the most efficient way. The only guarantee is
that it won't buffer more than max_buffer_size.

Anyway :) Practically, the test does work on both py3k and another
implementation, so I don't see any urgency to remove anything from it.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4263>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to