[Python-ideas] Implicit string literal concatenation considered harmful?
Mark Janssen
dreamingforward at gmail.com
Sat May 11 21:22:58 CEST 2013
> > I think that is an awesome idea.
>
> Violates TOOWTDI.
>
> >>> print("This is an" + # traditional explicit operator
> ... " %s idea." % ("awesome" if False else "unimpressive"))
> This is an unimpressive idea.
> >>>
But you see you just helped me demonstrate my point: the Python
interpreter *itself* uses ... as a line-continuation operater!
Also, it won't violate TOOWTDI if the "+" operator is deprecated for
strings. Strings are different from numbers anyway, it's an old
habit/wart to use "+" for them.
*moving out of the way* :))
--
MarkJ
Tacoma, Washington
More information about the Python-ideas
mailing list