Facundo Batista <facundobati...@gmail.com> writes:

>             if (width == 0 and height == 0 and
>                 color == 'red' and emphasis == 'strong' or
>                 highlight > 100):
>                 raise ValueError("sorry, you lose")
>
> In the example the line is broken after the 'and' or 'or' *keywords*,

‘and’ and ‘or’ are binary operators (that also happen to be keywords).
The description is accurate and IMO not misleading.

> not after the '==' *operator* (which is the nice way of doing it).

−1. The lower-priority binding operator is the better place to break the
line. The binary logical operators bind at lower priority than the
equality operator.

-- 
 \           “If you do not trust the source do not use this program.” |
  `\                                —Microsoft Vista security dialogue |
_o__)                                                                  |
Ben Finney

_______________________________________________
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