[Python-3000] print() flushing problem.

Luke Stebbing luke.stebbing at gmail.com
Thu Nov 8 21:34:21 CET 2007


On 11/8/07, Wojciech Walczak <wojtek.gminick.walczak at gmail.com> wrote:
> Got it! Please, take a look at my patch. It's in the attachment. I am
> still digging in the source, but I think that I have found the core of
> the bug.
> Without that patch "ret=sys.stdout.write('x')" acts in the same way as
> print('x',end=''), which is - it prints nothing. After applying the
> patch it is allright for both sys.stdout.write() and for print().

If the buffer size is 1, isn't that arguably the correct behavior,
i.e. don't flush until you have _more_ data than you can store?

Luke


More information about the Python-3000 mailing list