INADA Naoki added the comment:

On Fri, Apr 15, 2016 at 11:31 PM, Guido van Rossum <rep...@bugs.python.org>
wrote:

>
> Guido van Rossum added the comment:
>
> I don't like the way "):" is indented in that example.

Me too.
I haven't know about this PEP8 update.
https://github.com/python/peps/commit/843b7d2cdb954dc0aa5ea70f140db2bd42943e1f

> I propose:
>
>             if ((width == 0
>                  and height == 0
>                  and color == 'red'
>                  and emphasis == 'strong')
>                 or highlight > 100):
>
>
Looks better to me.  But how about this?

if (width == 0
        and height == 0
        and color == 'red'
        and emphasis == 'strong'
    or highlight > 100):

Changing indentation level based on operator precedence is acceptable?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26763>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to