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 davidsarah
Recipients David.Sankel, amaury.forgeotdarc, brian.curtin, christian.heimes, christoph, davidsarah, ezio.melotti, hippietrail, lemburg, mark, pitrou, santoso.wijaya, ssbarnea, terry.reedy, tim.golden, tzot, v+python, vstinner
Date 2011-03-25.01:21:20
SpamBayes Score 2.7401006e-07
Marked as misclassified No
Message-id <1301016083.18.0.543139742302.issue1602@psf.upfronthosting.co.za>
In-reply-to
Content
Glenn Linderman wrote:
> Presently, a correct application only needs to flush between a sequence of writes and a sequence of buffer.writes.

Right. The new requirement would be that a correct app also needs to flush between a sequence of buffer.writes (that end in an incomplete line, or always if PYTHONUNBUFFERED or python -u is used), and a sequence of writes.

> Don't assume the flush happens after every write, for a correct application.

It's rather hard to implement this without any change in behaviour. Or rather, it isn't hard if the TextIOWrapper were to flush its underlying buffer before each time it writes to the console, but I'd be concerned about the extra overhead of that call. I'd prefer not to do that unless the new requirement above leads to incompatibilities in practice.
History
Date User Action Args
2011-03-25 01:21:24davidsarahsetrecipients: + davidsarah, lemburg, terry.reedy, tzot, amaury.forgeotdarc, pitrou, vstinner, christian.heimes, tim.golden, mark, christoph, ezio.melotti, v+python, hippietrail, ssbarnea, brian.curtin, santoso.wijaya, David.Sankel
2011-03-25 01:21:23davidsarahsetmessageid: <1301016083.18.0.543139742302.issue1602@psf.upfronthosting.co.za>
2011-03-25 01:21:22davidsarahlinkissue1602 messages
2011-03-25 01:21:21davidsarahcreate