PEP 259: Omit printing newline after newline

Gustaf Liljegren gustafl at algonet.se
Mon Jun 11 19:16:24 EDT 2001


Guido van Rossum <guido at digicool.com> wrote:

>     I propose to skip printing the newline when it follows a newline
>     that came from data.

I like consistency, so I think either 'print' should add a newline, or it 
shouldn't. Whatever you choose, it shouldn't do things "behind the scenes". 
If it depends on the line before, it won't be so self-explanatory if you 
see a 'print' statement with no arguments.

If you make rstrip() a built-in function, you get something like chomp() in 
Perl. :-)

Regards,

Gustaf Liljegren



More information about the Python-list mailing list