[Python-ideas] Implicit string literal concatenation considered harmful?
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun May 12 01:55:34 CEST 2013
Ian Cordasco wrote:
> On Sat, May 11, 2013 at 2:52 PM, Mark Janssen <dreamingforward at gmail.com> wrote:
>>It partitions the conceptual space. "+" is a mathematical operator,
>>but strings are not numbers.
>
> But + is already a supported operation on strings
I still think about these two kinds of concatenation in
different ways, though. When I use implicit concatenation,
I don't think in terms of taking two strings and joining
them together. I'm just writing a single string literal
that happens to span two source lines.
I believe that distinguishing them visually helps
readability. Using + for both makes things look more
complicated than they really are.
--
Greg
More information about the Python-ideas
mailing list