This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients amaury.forgeotdarc, docs@python, eric.araujo, georg.brandl, techtonik, terry.reedy, vstinner
Date 2012-01-09.19:59:39
SpamBayes Score 5.6121774e-14
Marked as misclassified No
Message-id <1326139179.84.0.49246565533.issue11633@psf.upfronthosting.co.za>
In-reply-to
Content
The current doc says

"print([object, ...], *, sep=' ', end='\n', file=sys.stdout) 
Print object(s) to the stream file, separated by sep and followed by end. sep, end and file, if present, must be given as keyword arguments.

All non-keyword arguments are converted to strings like str() does and written to the stream, separated by sep and followed by end. Both sep and end must be strings; they can also be None, which means to use the default values. If no object is given, print() will just write end.

The file argument must be an object with a write(string) method; if it is not present or None, sys.stdout will be used."

(The bit about None, said twice, could be factored out and said once after the second sentence.)

This is exactly what print does and Guido today (Python ideas) said that is what it should do and that "Apps that need flushing should call flush()." So a code change is rejected.

The issue title was incorrect. The print function does not do any buffering. The file object it writes to may. Even sys.stdout may or may not. 

We could add at the end a sentence or two something like

"Output buffering is determined by *file*. Call file.flush() to ensure, for instance, immediate appearance on a screen."
History
Date User Action Args
2012-01-09 19:59:39terry.reedysetrecipients: + terry.reedy, georg.brandl, amaury.forgeotdarc, vstinner, techtonik, eric.araujo, docs@python
2012-01-09 19:59:39terry.reedysetmessageid: <1326139179.84.0.49246565533.issue11633@psf.upfronthosting.co.za>
2012-01-09 19:59:39terry.reedylinkissue11633 messages
2012-01-09 19:59:39terry.reedycreate