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/2016-January/142802.html below:

[Python-Dev] Update PEP 7 to require curly braces in C

[Python-Dev] Update PEP 7 to require curly braces in C [Python-Dev] Update PEP 7 to require curly braces in CEthan Furman ethan at stoneleaf.us
Tue Jan 19 13:29:07 EST 2016
On 01/19/2016 08:56 AM, Jim J. Jewett wrote:

> That "otherwise" gets a bit awkward, but I like the idea.  Perhaps
> "braces must not be omitted, and should normally be formatted as
> follows. ... Where other C styles would permit a braceless one-liner,
> the expression and braces may be moved to a single line, as follows: "
>
>      if (x > 5) { y++ }
>
> I think that is clearly better, but it may be *too* lightweight for
> flow control.
>
>      if (!obj)
>          { return -1; }
>
> does work for me, and I think the \n{} may actually be useful for
> warning that flow control takes a jump.

Either of those two, with preference for the second on multiline ifs, 
seems quite readable to me.

--
~Ethan~

More information about the Python-Dev mailing list

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