[Python-ideas] Implicit String Concatenation

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

Adam Atlas <adam at atlas.st> wrote:
> Currently, you can do multiline strings a couple of ways:
> x = '''foo
> bar
> baz'''
> x = 'foo' \
>      'bar' \
>      'baz'
> 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

use textwrap.dedent and friends.

 - Josiah

More information about the Python-ideas mailing list