David-Sarah Hopwood <david-sa...@jacaranda.org> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1602>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to