[Python-ideas] Implicit string literal concatenation considered harmful?
Juancarlo Añez
apalala at gmail.com
Sat May 11 00:07:24 CEST 2013
On Fri, May 10, 2013 at 3:00 PM, Guido van Rossum <guido at python.org> wrote:
> There are plenty of examples where the continuation isn't on the same
> line (some were already posted here).
>
+1
I've never used the feature and don't intent to.
A related annoyance is the trailing comma at the end of stuff (probably a
leftover from a previous edit). For example:
def fun(a, b, c,):
Parses fine. But the one that has bitten me is the comma at the end of a
line:
>>> x = 1,
>>> x
(1,)
>>> x == 1, # inconsistency?
(False,)
>>> x == (1,)
True
>>> y = a_very_long_call(param1, param2, param3), # this trailing comma is
difficult to spot
I'd prefer that the syntax for creating one-tuples requires the
parenthesis, and that trailing commas are disallowed.
Cheers,
--
Juancarlo *Añez*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130510/c77a4184/attachment.html>
More information about the Python-ideas
mailing list