A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20160119/857c738f/attachment.html below:

<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Let's not switch to either of those options. Visually I much prefer either of these:<br><br></div>if (test) {<br></div>    blah;<br>}<br><br></div>or<br><br></div>if (test)<br></div>    blah;<br><br></div>over the versions with '{ blah; }' (regardless of whether it's on the same line as 'if' or on the next line). It looks like the shorter versions are mostly used inside macros, where aesthetics usually go out the door anyways in favor of robustness.<br><br></div>Since this discussion is never going to end until someone says "enough", let me just attempt that (though technically it's Brett's call) -- let's go with the strong recommendation to prefer<br><br></div>if (test) {<br></div>    blah;<br>}<br><br></div>and stop there.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 19, 2016 at 10:29 AM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 01/19/2016 08:56 AM, Jim J. Jewett wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That "otherwise" gets a bit awkward, but I like the idea.  Perhaps<br>
"braces must not be omitted, and should normally be formatted as<br>
follows. ... Where other C styles would permit a braceless one-liner,<br>
the expression and braces may be moved to a single line, as follows: "<br>
<br>
  Â  Â if (x > 5) { y++ }<br>
<br>
I think that is clearly better, but it may be *too* lightweight for<br>
flow control.<br>
<br>
  Â  Â if (!obj)<br>
  Â  Â  Â  Â { return -1; }<br>
<br>
does work for me, and I think the \n{} may actually be useful for<br>
warning that flow control takes a jump.<br>
</blockquote>
<br></span>
Either of those two, with preference for the second on multiline ifs, seems quite readable to me.<br>
<br>
--<br>
~Ethan~<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4