[Python-ideas] Implicit String Concatenation (original) (raw)

Josiah Carlson jcarlson at uci.edu
Thu Apr 12 00:19:29 CEST 2007


Adam Atlas <adam at atlas.st> wrote: [snip]

Currently, you can do multiline strings a couple of ways: x = '''foo bar baz''' _x = 'foo' _ _'bar' _ 'baz' [snip] x = 'foo 'bar 'baz'

That's a horrible idea. It's even worse than the 'space implies concatenation' suggestion made earlier.

If you want to get rid of indentation in the case of...

x = '''foo
       bar
       baz'''

use textwrap.dedent and friends.



More information about the Python-ideas mailing list