[Python-Dev] PEP 259: Omit printing newline after newline

Greg Ewing greg@cosc.canterbury.ac.nz
Wed, 13 Jun 2001 11:57:35 +1200 (NZST)


Thomas Wouters <thomas@xs4all.net>:

> I'd also prefer special syntax to control the softspace
> behaviour... Too late for that, I 'spose

Maybe not. I'd suggest spelling "don't add a newline or
a space after this" as:

   print a, b, c...

This could coexist with the current softspace behaviour,
and the use of a trailing comma could be deprecated.
After a suitable warning period, the softspace flag
could then be removed.

> print "spam:", "ham" : "and" : "eggs"

> to print 'spamandeggs' without a space inbetween.

I don't think it's so important to have a special syntax
for that, since it can be accomplished in other ways
without too much difficulty, e.g.

   print "%s: %s%s%s" % ("spam", "ham", "and", "eggs")...

The main thing I'd like is to get rid of the statefulness of
the current behaviour.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+