The key section in PEP 8 that was updated (apart from fixing up references):
Should a line break before or after a binary operator?
------------------------------------------------------
For decades the recommended style has been to break after binary
operators. However, recent reseach unearthed recommendations by
Donald Knuth to break *before* binary operators, in his writings about
typesetting [3]_. Therefore it is permissible to break before or
after a binary operator, as long as the convention is consistent
locally. For new code Knuth's style is suggested.
Some examples of code breaking before binary Boolean operators::
class Rectangle(Blob):
def __init__(self, width, height,
color='black', emphasis=None, highlight=0):
if (width == 0
and height == 0
and color == 'red'
and emphasis == 'strong'
or highlight > 100):
raise ValueError("sorry, you lose")
if (width == 0 and height == 0
and (color == 'red' or emphasis is None)):
raise ValueError("I don't think so -- values are %s, %s" %
(width, height))
Blob.__init__(self, width, height,
color, emphasis, highlight)
--
--Guido van Rossum (
python.org/~guido)