[Python-ideas] Pythonic buffering in Py3 print()
Cameron Simpson
cs at zip.com.au
Thu Jan 12 02:40:17 CET 2012
On 11Jan2012 19:15, Terry Reedy <tjreedy at udel.edu> wrote:
| On 1/11/2012 6:02 PM, Cameron Simpson wrote:
| >Better if we only specify behaviour for True (flush now) and
| >None/default/missing (flush default) and make it slightly clear that
| >other values do not have defined behaviour.
|
| That was the intent of my suggested doc rewording -- file controls
| flushing unless flush=True is given. What I wrote on the issue was a
| first try and I suspect that there are other and perhaps better
| concise wordings. Post one on the issue if you have one. (But
| writing in 'doc style' is not always easy ;-).
Do I comment here, or in #11633 (which is closed) or in #13761?
We seem to have multiple streams of discussion.
BTW, regarding #11633, I don't like your sentence:
Use ``sys.stdout.flush()`` to ensure immediate appearance on a screen
Shouldn't that be "*file*.flush()" ? I would _not_ want to give a
shallow reader the idea that flushing stdout magicly sorts their
problems with a specific file. And I've seen that level of logical gap
in various questions on python-list (and elsewhere, of course).
I'd also change "ensure immediate appearance on a screen" to "ensure
immediate output, for example to ensure appearance on a screen".
Again, it changes the wording from "to perform this specific special
case call flush" to "calling flush does blah, for example to aid this
specific case".
Cheers,
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
When in doubt, gas it. It may not solve the problem, but it ends the suspense.
- Steve Moonitz (92 Ducati 900ss) <stevem at ew.timeinc.com>
More information about the Python-ideas
mailing list