<br><div class="gmail_quote">On Thu, May 16, 2013 at 9:57 AM, Christian Tismer <span dir="ltr"><<a href="mailto:tismer@stackless.com" target="_blank">tismer@stackless.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div id=":no">The "&" is not a valid operator on strings and looks pretty much like<br>
gluing parts together. It is better than the "\" that just escapes the newline<br>
and cannot take comments.<br></div></blockquote></div><br>I don't like something that is a standard operator becoming special syntax. While it's true that string & string is not valid, it's not the case that string & ... is not valid. I dislike dot for the same reason. It's confusing that these would do different things:<div>

<br></div><div><font face="courier new, monospace">    'abc' & 'def'</font></div><div><font face="courier new, monospace">    ('abc') & 'def'</font></div><div><br></div><div><div>I like the \ idea because it's clearly syntax and not an operator, but the fact that it doesn't work with comments is annoying since one reason to break a string is to insert comments. I don't like that spaces after the \ are not allowed because trailing spaces are invisible to me but not to the parser. So what if the rule for trailing \ was changed to:<br>

<div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>The \ continuation character may be followed by white space and a comment. If a comment is present, there must be at least one whitespace character between the \ and the comment.</div>

</div></blockquote><div><div><br></div><div><div>That is:</div><div><br></div><div><font face="courier new, monospace">x = [  # THIS WOULD BE ALLOWED</font></div><div><font face="courier new, monospace">    'abc'   \</font></div>

<div><font face="courier new, monospace">    'def'   \   # not the python keyword</font></div><div><font face="courier new, monospace">    'ghi'</font></div><div><font face="courier new, monospace">]</font></div>

<div><div><br></div><div><div><font face="courier new, monospace">x = [  # THIS WOULD BE AN ERROR</font></div><div><font face="courier new, monospace">    'abc'   \</font></div><div><font face="courier new, monospace">    'def'   </font><font face="courier new, monospace"># a comment but no </font><span style="font-family:'courier new',monospace">continuation </span><span style="font-family:'courier new',monospace">\</span></div>

<div><font face="courier new, monospace">    'ghi'</font></div><div><font face="courier new, monospace">]</font></div><div></div><div><br></div><div>One thing I like about using \ is that it already works (aside from my proposed comment change). So anyone wanting to write forward/backward-compatible code can just add the \s now. If you want to start enforcing the restriction, just use from __future__ import explicit_string_continuation.</div>

<br clear="all"><div><font face="arial, helvetica, sans-serif">--- Bruce</font><div><span style="font-family:arial,helvetica,sans-serif">Latest blog post: Alice's Puzzle Page </span><a href="http://www.vroospeak.com/" style="font-family:arial,helvetica,sans-serif" target="_blank">http://www.vroospeak.com</a></div>

<div><div><font face="arial, helvetica, sans-serif">Learn how hackers think: <a href="http://j.mp/gruyere-security" target="_blank">http://j.mp/gruyere-security</a></font></div></div></div>
</div></div></div></div></div>