[issue13761] Add flush keyword to print()

2012-01-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3120a988a1a3 by Georg Brandl in branch 'default': Closes #13761: add a "flush" keyword argument to print(). http://hg.python.org/cpython/rev/3120a988a1a3 -- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected st

[issue13761] Add flush keyword to print()

2012-01-12 Thread Éric Araujo
Éric Araujo added the comment: Patch LGTM. (s/assertEquals/assertEqual/ though, or you’ll get a warning) -- nosy: +eric.araujo ___ Python tracker ___ __

[issue13761] Add flush keyword to print()

2012-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Anatoly, duly noted, and disagreed with. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue13761] Add flush keyword to print()

2012-01-12 Thread anatoly techtonik
anatoly techtonik 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

[issue13761] Add flush keyword to print()

2012-01-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue13761] Add flush keyword to print()

2012-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: Ok, I'm fine with passing through the exception from flush(). -- ___ Python tracker ___ ___ Pytho

[issue13761] Add flush keyword to print()

2012-01-11 Thread Cameron Simpson
Cameron Simpson added the comment: Flush can fail of disc full or any number of low level things that prevent the OS getting the data into the on-disc file. Speaking for myself, I certainly want to know if that happens. -- ___ Python tracker

[issue13761] Add flush keyword to print()

2012-01-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think it should be re-raised (or rather, let pass through as in the patch). If you are asking for a flush you want to know why it failed. (it shouldn't ever fail on "normal" files, anyway) -- nosy: +pitrou ___ Py

[issue13761] Add flush keyword to print()

2012-01-11 Thread Cameron Simpson
Cameron Simpson added the comment: I'm against ignoring a flush failure. What happened to "errors should never pass silently"? IMO, if we get as far as calling flush and having an exception occur, a "more interesting error" hasn't yet occurred. I really dislike things that fail silently. If t

[issue13761] Add flush keyword to print()

2012-01-11 Thread Cameron Simpson
Changes by Cameron Simpson : -- nosy: +cameron ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13761] Add flush keyword to print()

2012-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: I'd ignore the failure. It could easily mask some other more interesting error. -- ___ Python tracker ___ ___

[issue13761] Add flush keyword to print()

2012-01-11 Thread Georg Brandl
Georg Brandl added the comment: Here is a patch. One open question is whether failure in flush() should be reraised (as implemented in the patch), or ignored (as in input()). -- keywords: +patch Added file: http://bugs.python.org/file24203/flush.patch

[issue13761] Add flush keyword to print()

2012-01-11 Thread Georg Brandl
Georg Brandl added the comment: There is a reason: we don't usually check the type of flag arguments; just their truth value is used. -- ___ Python tracker ___

[issue13761] Add flush keyword to print()

2012-01-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I added a couple of lines to the 3.2, 3.3 print doc in #11633. When a change is made here, they could be updated to something like: "Output buffering is normally determined by *file*. Use flush=True to force immediate output to a device such as a screen." Unl

[issue13761] Add flush keyword to print()

2012-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: In the python-ideas discussion people have argued that flush=False should or could be interpreted as "definitely do not flush" which is unimplementable (the buffer may be full, or the stream may be unbuffered, and there is no way to tell a write() call to s

[issue13761] Add flush keyword to print()

2012-01-11 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue13761] Add flush keyword to print()

2012-01-11 Thread Georg Brandl
New submission from Georg Brandl : Add a flush keyword argument to print(), defaulting to False. If true, output will be flushed immediately. See http://mail.python.org/pipermail/python-ideas/2012-January/013340.html -- assignee: georg.brandl components: Interpreter Core keywords: easy