[Python-ideas] Implicit string literal concatenation considered harmful?
Andrew Barnert
abarnert at yahoo.com
Sat May 11 07:15:48 CEST 2013
On May 10, 2013, at 22:11, Random832 <random832 at fastmail.us> wrote:
> On 05/11/2013 01:05 AM, Andrew Barnert wrote:
>> How is this any better than + in the same position? It's harder to notice, and longer (remember that the only reason you're doing this is that you can't fit your strings into 80 cols).
>>
>> By the way, is it just a coincidence that almost all of the people sticking up for keeping or replacing implicit concatenation instead of just scrapping it are using % formatting in their examples?
> You just answered your own question. The reason it's better than + in the same position, for those people, is that it would have higher precedence than %.
Ah, that makes sense.
Except that % formatting is supposed to be one of those "we haven't deprecated it, but we will, so stop using it" features, so it seems a little odd to add new syntax to make % formatting easier.
Also, doesn't this imply that ... is now an operator in some contexts, but a literal in others?
More information about the Python-ideas
mailing list