PEP 8: Replaced outdated usages of `print` as a statement (#2271)

This commit is contained in:
Boris Gorelik 2022-01-25 17:20:55 +02:00 committed by GitHub
parent 5e5616dce3
commit 8306a794bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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