<p dir="ltr"><br>
On 11 May 2013 04:50, "Guido van Rossum" <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>
><br>
> I just spent a few minutes staring at a bug caused by a missing comma<br>
> -- I got a mysterious argument count error because instead of foo('a',<br>
> 'b') I had written foo('a' 'b').<br>
><br>
> This is a fairly common mistake, and IIRC at Google we even had a lint<br>
> rule against this (there was also a Python dialect used for some<br>
> specific purpose where this was explicitly forbidden).<br>
><br>
> Now, with modern compiler technology, we can (and in fact do) evaluate<br>
> compile-time string literal concatenation with the '+' operator, so<br>
> there's really no reason to support 'a' 'b' any more. (The reason was<br>
> always rather flimsy; I copied it from C but the reason why it's<br>
> needed there doesn't really apply to Python, as it is mostly useful<br>
> inside macros.)<br>
><br>
> Would it be reasonable to start deprecating this and eventually remove<br>
> it from the language?</p>
<p dir="ltr">I could live with it if we get "dedent()" as a string method. I'd be even happier if constant folding was extended to platform independent method calls on literals, but I don't believe there's a sane way to maintain the "platform independent" constraint.</p>
<p dir="ltr">OTOH, it's almost on the scale of "remove string mod formatting". Shipping at least a basic linting tool in the stdlib would probably be almost as effective and substantially less disruptive. lib2to3 should provide some decent infrastructure for that.</p>
<p dir="ltr">Cheers,<br>
Nick.</p>
<p dir="ltr">><br>
> --<br>
> --Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)<br>
> _______________________________________________<br>
> Python-ideas mailing list<br>
> <a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
> <a href="http://mail.python.org/mailman/listinfo/python-ideas">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
</p>