[Python-ideas] Pythonic buffering in Py3 print()
Guido van Rossum
guido at python.org
Thu Jan 12 00:33:33 CET 2012
See what I added to the tracker.
On Wed, Jan 11, 2012 at 3:02 PM, Cameron Simpson <cs at zip.com.au> wrote:
> [ Taken back on list - I can't see anyway personal here, and the
> objection is a good one. - Cameron
> On 11Jan2012 08:41, Paul Moore <p.f.moore at gmail.com> wrote:
> | On 11 January 2012 06:15, Cameron Simpson <cs at zip.com.au> wrote:
> | > | flush=None?
> | >
> | > +1 from me, if None means "honour the file's default flushing
> | > behaviour".
> | The trouble with this is that we then have:
> | - no parameter (default None) => default behaviour
> | - flush=True => Always flush
> | and that begs the question of what an explicit flush=False means, and
> | people will assume it means "never flush" even thought you can't force
> | that as the underlying stream might auto-flush (e.g., at a newline).
> | +1 for flush=True/False, with a default of False (meaning do the
> | stream's default behaviour).
> Hmm. Good point about False suggesting "never flush", but I think it should
> just be considered invalid. What about flush=3, or flush=tuple?
> 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 leaves scope later
> for defining a sane (or at least clear) meaning for False if a _useful_
> one is ever agreed upon. Call it "reserved".
> Cameron Simpson <cs at zip.com.au> DoD#743
> Copyright and Patents: To prevent the Progress of Science and useful Arts,
> securing for unlimited Times to Authors and Inventors and Trolls the
> exclusive Right to all Writings and Discoveries.
> Python-ideas mailing list
> Python-ideas at python.org
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas