semi-concatenated strings

Steven Majewski sdm7g at Virginia.EDU
Thu May 30 16:36:52 EDT 2002


On 30 May 2002, Grant Griffin wrote:

> I discovered today that strings can sometimes be concatenated without using a
> "+":

>    >>> a = 'one' ' plus ' 'two'
>    >>> a
>    'one plus two'

[...]

> Is there some grand purpose here, or is this just a bug in the parser?

It's a feature, not a bug:

I believe that it predates the triple quoted strings as a way to have
very long multiline strings. ( I'ld have to dig thru the news archives
or the changelog to be certain about the history. )

(There should only be HOW MANY WAYS?! ;-)

-- Steve Majewski





More information about the Python-list mailing list