PEP 8: Replaced outdated usages of `print` as a statement (#2271)
This commit is contained in:
parent
5e5616dce3
commit
8306a794bc
|
@ -465,12 +465,12 @@ Avoid extraneous whitespace in the following situations:
|
|||
- Immediately before a comma, semicolon, or colon::
|
||||
|
||||
# Correct:
|
||||
if x == 4: print x, y; x, y = y, x
|
||||
if x == 4: print(x, y); x, y = y, x
|
||||
|
||||
::
|
||||
|
||||
# Wrong:
|
||||
if x == 4 : print x , y ; x , y = y , x
|
||||
if x == 4 : print(x , y) ; x , y = y , x
|
||||
|
||||
- However, in a slice the colon acts like a binary operator, and
|
||||
should have equal amounts on either side (treating it as the
|
||||
|
|
Loading…
Reference in New Issue