News for hackers. Stuff that matters.
Re:Python Print() and Beyond by shakna on Sunday December 20, 2020 @10:35PM (#25491906)
> This is because since it's on a single line, it is all buffered (packed) before we get it.

Usually. Depending on the environment. It's probably worth pointing out here that Python isn't controlling that buffering - print could have its own buffer, and it could be read that way, but it doesn't.

And buffering-to-newline is a common behaviour, but not necessarily a guaranteed behaviour. You may still wish to flush after a newline, depending on the platform.

Unless you're in REPL, in which case Python often tells the environment how it would like it to buffer, as part of the readline implementation.

There are no comments on this comment yet.