A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-January/115225.html below:

[Python-Dev] PEP 7 clarification request: braces

[Python-Dev] PEP 7 clarification request: braces [Python-Dev] PEP 7 clarification request: bracesPetri Lehtinen petri at digip.org
Mon Jan 2 14:24:28 CET 2012
Antoine Pitrou wrote:
> I don't like having the else on the same line as the closing brace,
> and prefer:
> 
>    if (cond) {
>        statement;
>    }
>    else {
>        statement;
>    }

And this is how it's written in PEP-7. It seems to me that PEP-7
doesn't require braces. But it explicitly forbids

    if (cond) {
        statement;
    } else {
        statement;
    }

by saying "braces as shown", and then showing them like this:

    if (mro != NULL) {
        ...
    }
    else {
        ...
    }

> That said, I agree with Benjamin: the shorter form is visually lighter
> and should not be frown upon.

Me too.
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