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

Andrew Barnert abarnert at yahoo.com
Thu May 16 07:54:53 CEST 2013


From: Markus Unterwaditzer <markus at unterwaditzer.net>

Sent: Wednesday, May 15, 2013 10:18 PM


> Not sure why nobody mentioned it yet, maybe it's obviously not helping in 
> this situation, but...
> 
> What if such multi-line strings have to have their own set of parens around 
> them?
> 
> Valid:
> do_foo(
>     ("foo"
>      "bar"),
>      "baz"
> )
> 
> Invalid:
> do_foo(
>     "foo"
>      "bar",
>      "baz"
> )


As I understand it, the main reason people didn't like Guido's suggestion of "just use +" was that (because of operator precedence) they'd sometimes have to add parentheses that are unnecessary today. So, I'm betting it will be just as unpopular with the same people.

Personally, I don't dislike it. But then I don't dislike the "just use +" answer either.



More information about the Python-ideas mailing list