[Python-ideas] Make print() not append line break by default

Steven D'Aprano steve at pearwood.info
Sun Jan 19 12:08:03 CET 2014


On Sun, Jan 19, 2014 at 03:47:00PM +0700, musicdenotation at gmail.com wrote:

> And add println()

Print natural log?

For the major use cases print is designed for, you want it to print a 
newline at the end. For those rare times you don't, print(..., end='') 
is simple enough.

Besides, print has inserted a newline at the end since at least 
Python 1.5. There is a lot of code relying on that behaviour. Even if we 
wanted to change, backwards-compatibility considerations would prevent 
it.


-- 
Steven


More information about the Python-ideas mailing list