[Python-ideas] Implicit string literal concatenation considered harmful?

Michael Mitchell epsilonmichael at gmail.com
Sat May 11 02:36:02 CEST 2013


On Fri, May 10, 2013 at 7:08 PM, Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:

> Does this earn a point?
>
> x = (+ 'foo\n'
>
>      + 'bar\n'
>      + 'baz\n'
>     )
>

Plus doesn't make sense as a unary operator on strings.

x = ('foo\n' +
     'bar\n' +
     'baz\n' +
     '')

This would work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130510/08ebe41e/attachment.html>


More information about the Python-ideas mailing list