[issue13761] Add flush keyword to print()

anatoly techtonik report at bugs.python.org
Thu Jan 12 09:24:56 CET 2012


anatoly techtonik <techtonik at gmail.com> added the comment:

I am not discussing "printing to file", so my 0.02 is that "flush=True" should be made default for print() with sys.stdout, because it is probably what users expect when calling this function.

If somebody needs buffering/cache or more fine-grained control over output, they are free to use sys.stdout.write/flush directly.

And users won't be happy to wrap every print() into try/catch to guard from the flush exceptions.

----------
nosy: +techtonik

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


More information about the Python-bugs-list mailing list