On 10/05/2013 20:26, Alexander Belopolsky wrote:
I'm not so sure.<mailto:guido@python.org>> wrote:
I just spent a few minutes staring at a bug caused by a missing comma
-- I got a mysterious argument count error because instead of foo('a',
'b') I had written foo('a' 'b').
I had a similar experience just few weeks ago. The bug was in a long
list written like this:
['item11', 'item12', ..., 'item17',
'item21', 'item22', ..., 'item27'
...
'item91', 'item92', ..., 'item97']
Clearly the bug crept in when more items were added. (I try to keep
redundant commas at the end of the list to avoid this, but not everyone
likes this style.)
Would it be reasonable to start deprecating this and eventually remove
it from the language?
+1, but I would start by requiring () around concatenated strings.
Currently, parentheses, brackets and braces effectively make Python ignore a newline within them.
(1
+2)
is the same as:
(1+2)
and:
[1
+2]
is the same as:
[1+2]
Under the proposal:
("a"
"b")
or:
("a" "b")
would be the same as:
("ab")
but:
["a"
"b"]
or:
["a" "b"]
would be a syntax error.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas