A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-March/117611.html below:

[Python-Dev] PEP 8 misnaming

[Python-Dev] PEP 8 misnaming [Python-Dev] PEP 8 misnamingBen Finney ben+python at benfinney.id.au
Wed Mar 14 14:03:10 CET 2012
Facundo Batista <facundobatista at 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

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4