[issue26763] Update PEP-8 regarding binary operators

INADA Naoki report at bugs.python.org
Fri Apr 15 09:52:39 EDT 2016


INADA Naoki added the comment:

How about recommend using parentheses to avoid different level operators have same indent level?

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

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

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26763>
_______________________________________


More information about the Python-bugs-list mailing list