Update PEP 8 to recommend against trailing whitespace.

This commit is contained in:
Guido van Rossum 2016-01-04 08:59:47 -08:00
parent 4ca86a3e7e
commit 8288ff6a15
1 changed files with 6 additions and 0 deletions

View File

@ -473,6 +473,12 @@ Avoid extraneous whitespace in the following situations:
Other Recommendations Other Recommendations
--------------------- ---------------------
- Avoid trailing whitespace anywhere. Because it's usually invisible,
it can be confusing: e.g. a backslash followed by a space and a
newline does not count as a line continuation marker. Some editors
don't preserve it and many projects (like CPython itself) have
pre-commit hooks that reject it.
- Always surround these binary operators with a single space on either - Always surround these binary operators with a single space on either
side: assignment (``=``), augmented assignment (``+=``, ``-=`` side: assignment (``=``), augmented assignment (``+=``, ``-=``
etc.), comparisons (``==``, ``<``, ``>``, ``!=``, ``<>``, ``<=``, etc.), comparisons (``==``, ``<``, ``>``, ``!=``, ``<>``, ``<=``,