[Python-ideas] Pythonic buffering in Py3 print()

Georg Brandl g.brandl at gmx.net
Wed Jan 11 09:28:25 CET 2012

Am 10.01.2012 22:36, schrieb Guido van Rossum:
> On Tue, Jan 10, 2012 at 5:27 AM, anatoly techtonik <techtonik at gmail.com
> <mailto:techtonik at gmail.com>> wrote:
>     So, py3k print() is not pythonic. To make it pythonic, the output should be
>     immediately available after you call it. If you need to buffer output - do
>     this explicitly, because print() doesn't guarantee that it will be buffered
>     anyway. If you care about performance - use sys.stdout directly and tune it
>     explicitly. 
> That's utter bullshit.
> However, I would be fine with adding a new keyword argument to print() in 3.3 to
> force a flush, as long as it defaults to off.

I've created an issue to track this:



More information about the Python-ideas mailing list