[Python-ideas] Implicit string literal concatenation considered harmful?
Stefan Behnel
stefan_ml at behnel.de
Sat May 11 11:37:54 CEST 2013
Georg Brandl, 11.05.2013 07:24:
> Am 11.05.2013 01:43, schrieb Philip Jenvey:
>> On May 10, 2013, at 1:09 PM, Michael Foord wrote:
>>> On 10 May 2013 20:16, Antoine Pitrou wrote:
>>>
>>> I'm rather -1. It's quite convenient and I don't want to add some '+'
>>> signs everywhere I use it. I'm sure many people also have long string
>>> literals out there and will have to endure the pain of a dull task to
>>> "fix" their code.
>>>
>>> However, in your case, foo('a' 'b') could raise a SyntaxWarning, since
>>> the "continuation" is on the same line.
>>>
>>> I'm with Antoine. I love using implicit concatenation for splitting long literals across multiple lines.
>>
>> Strongly -1 on this proposal, I also use this quite often.
>
> -1 here. I use it a lot too, and find it very convenient, and while I could
> live with the change, I think it should have been made together with the lot
> of other syntax changes going to Python 3.
I used to sort-of dislike it in the past and only recently started using it
more often, specifically for dealing with long string literals. I really
like it for that, although I've also been bitten by the "missing comma" bug.
I guess I'm -0.5 on removing it.
Stefan
More information about the Python-ideas
mailing list