[Python-ideas] Implicit string literal concatenation considered harmful?
Antoine Pitrou
solipsis at pitrou.net
Sun May 12 02:33:54 CEST 2013
On Sun, 12 May 2013 11:55:34 +1200
Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 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.
Agreed.
Regards
Antoine.
More information about the Python-ideas
mailing list