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.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to