<div dir="ltr">+1; I've been bitten by this many times.<div><br></div><div style>As already mentioned, one big use case where this is useful is having multiline string literals without having all the annoying indentation leak into your code. I think this could be easily fixed with a convenient .dedent() or .strip_margin() function.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 10, 2013 at 3:54 PM, MRAB <span dir="ltr"><<a href="mailto:python@mrabarnett.plus.com" target="_blank">python@mrabarnett.plus.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 10/05/2013 20:26, Alexander Belopolsky wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
<br>
On Fri, May 10, 2013 at 2:48 PM, Guido van Rossum <<a href="mailto:guido@python.org" target="_blank">guido@python.org</a><br></div><div><div class="h5">
<mailto:<a href="mailto:guido@python.org" target="_blank">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>
<br>
I had a similar experience just few weeks ago. The bug was in a long<br>
list written like this:<br>
<br>
['item11', 'item12', ..., 'item17',<br>
'item21', 'item22', ..., 'item27'<br>
...<br>
'item91', 'item92', ..., 'item97']<br>
<br>
Clearly the bug crept in when more items were added. (I try to keep<br>
redundant commas at the end of the list to avoid this, but not everyone<br>
likes this style.)<br>
<br>
<br>
Would it be reasonable to start deprecating this and eventually remove<br>
it from the language?<br>
<br>
<br>
+1, but I would start by requiring () around concatenated strings.<br>
<br>
</div></div></blockquote>
I'm not so sure.<br>
<br>
Currently, parentheses, brackets and braces effectively make Python ignore a newline within them.<br>
<br>
(1<br>
+2)<br>
<br>
is the same as:<br>
<br>
(1+2)<br>
<br>
and:<br>
<br>
[1<br>
+2]<br>
<br>
is the same as:<br>
<br>
[1+2]<br>
<br>
Under the proposal:<br>
<br>
("a"<br>
"b")<br>
<br>
or:<br>
<br>
("a" "b")<br>
<br>
would be the same as:<br>
<br>
("ab")<br>
<br>
but:<br>
<br>
["a"<br>
"b"]<br>
<br>
or:<br>
<br>
["a" "b"]<br>
<br>
would be a syntax error.<div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-ideas</a><br>
</div></div></blockquote></div><br></div>