<div dir="ltr">+1000<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 16, 2013 at 12:11 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="HOEnZb"><div class="h5">On 16/05/2013 19:41, Bruce Leban wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
At Chris Angelico's suggestion, starting another thread on this:<br>
<br>
The \ line continuation does not allow comments yet statements that span<br>
multiple lines may need internal comments. Also spaces after the \ are<br>
not allowed but trailing spaces are invisible to the reader but not to<br>
the parser. If you use parenthesis for continuation then you can add<br>
comments but there are cases where parenthesis don't work, for example,<br>
before in a with statement, as well as the current discussion of using \<br>
to make implicit string concatenation explicit. So I propose adopting<br>
this rule for trailing \ continuation:<br>
<br>
The \ continuation character may be followed by white space and a<br>
comment. If a comment is present, there must be at least one<br>
whitespace character between the \ and the comment.<br>
<br>
<br>
That is:<br>
<br>
x = y + \ # comment allowed here<br>
z<br>
<br>
with a as x, \ # comment here may be useful<br>
b as y, \ # or here<br>
c as z: \ # or here<br>
pass<br>
<br>
x = y + # syntax error<br>
z<br>
<br>
Two reasons for requiring a space after the backslash:<br>
<br>
(1) make the backslash more likely to stand out visually (and we can't<br>
require a space before it)<br>
<br>
(2) \# looks like it might be an escape sequence of some sort while I<br>
don't think \ # does, making this friendlier to readers.<br>
<br>
</blockquote></div></div>
You don't get escape sequences outside strings, so I'd be inclined not<br>
to insist that it be followed by a space, although it could be<br>
suggested as good style.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm not passionate about that detail if the rest of the proposal flies.<br>
<br>
</blockquote></div>
+1<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>
</blockquote></div><br><br clear="all"><br>-- <br>Keeping medicines from the bloodstreams of the sick; food <br>from the bellies of the hungry; books from the hands of the <br>uneducated; technology from the underdeveloped; and putting <br>
advocates of freedom in prisons. Intellectual property is<br>to the 21st century what the slave trade was to the 16th.<br>
</div>