[Python-Dev] PEP 259: Omit printing newline after newline
Tim Peters
tim.one@home.com
Tue, 12 Jun 2001 03:29:02 -0400
[/F]
> when was this discussed on python-dev?
It wasn't -- it actually came up on one of the SourceForge mailing lists ...
ah, of course, tried to search but "Geocrawler is down for nightly database
maintenance". They sure have long nights <wink/snarl>.
I'm guessing it's the python-iterators list. It spun off of a thread where
Guido was wondering whether one of the new ways to spell "iterate over a
file" should return lines without trailing \n, so that e.g.
for line in sys.stdin:
print line
wasn't a surprise. I opined it would be better to make all ways of
iterating a file do the same thing, but change print instead. We both
agreed that couldn't happen. But then I couldn't find any code it would
break, only code of the form
print line,
where the "," was trying to suppress the extra newline, and that would
continue to work the same way even if print were changed. The notion that
legions of people are using
print line
as an obscure way to get double-spacing is taking me by surprise. Nobody on
the iterators list had this objection.
win-some-lose-some-lose-some-lose-some-lose-some-ly y'rs - tim