[Python-Dev] PEP 8 updated on whether to break before or after a binary update (original) (raw)
Victor Stinner victor.stinner at gmail.com
Fri Apr 15 13:03:44 EDT 2016
- Previous message (by thread): [Python-Dev] PEP 8 updated on whether to break before or after a binary update
- Next message (by thread): [Python-Dev] PEP 8 updated on whether to break before or after a binary update
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hum.
if (width == 0
and height == 0
and color == 'red'
and emphasis == 'strong'
or highlight > 100):
raise ValueError("sorry, you lose")
Please remove one space to vertically align "and" operators with the opening parenthesis:
if (width == 0
and height == 0
and color == 'red'
and emphasis == 'strong'
or highlight > 100):
raise ValueError("sorry, you lose")
(I'm not sure that the difference is obvious in a mail client, you need a fixed width font which is not the case in my Gmail editor.)
It helps to visually see that the multiline test and the raise instruction are in two different blocks.
(Moreover, the pep8 checks of OpenStack simply reject such syntax, but I cannot use this syntax anymore :-))
Victor
- Previous message (by thread): [Python-Dev] PEP 8 updated on whether to break before or after a binary update
- Next message (by thread): [Python-Dev] PEP 8 updated on whether to break before or after a binary update
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]