Message132064
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. |
|
Date |
User |
Action |
Args |
2011-03-25 01:21:24 | davidsarah | set | recipients:
+ 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:23 | davidsarah | set | messageid: <1301016083.18.0.543139742302.issue1602@psf.upfronthosting.co.za> |
2011-03-25 01:21:22 | davidsarah | link | issue1602 messages |
2011-03-25 01:21:21 | davidsarah | create | |
|