[Python-ideas] Pythonic buffering in Py3 print()
Masklinn
masklinn at masklinn.net
Tue Jan 10 11:15:58 CET 2012
On 10 janv. 2012, at 10:05, INADA Naoki <songofacandy at gmail.com> wrote:
> On Tue, Jan 10, 2012 at 5:49 PM, Carl M. Johnson
> <cmjohnson.mailinglist at gmail.com> wrote:
>>
>> On Jan 9, 2012, at 7:52 PM, INADA Naoki wrote:
>>
>>> What about adding flush=False keyword argument to print()?
>>
>> I would expect flush=False to mean "please don't flush this right now, even if I do use a newline."
>
> print() doesn't flushes even if there is newline.
Ni, but the underlying stream may flush itself on newlines.
> So the keyword argument means
> "do or don't call flush() method of the file."
That's not clear from its name since the flushing behavior can depend on the underlying stream type. force_flush would be closer to the actual meaning of the param.
More information about the Python-ideas
mailing list