Skip to content

Commit

Permalink
PEP 8: Replaced outdated usages of print as a statement (#2271)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgbg authored Jan 25, 2022
1 parent 5e5616d commit 8306a79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pep-0008.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8306a79

Please sign in to comment.