Minor nits. Add strong preference for spaces over tabs.
This commit is contained in:
parent
1c6e4e6c3c
commit
7112960b46
17
pep-0008.txt
17
pep-0008.txt
|
@ -64,12 +64,19 @@ Code lay-out
|
||||||
these warnings become errors. These options are highly
|
these warnings become errors. These options are highly
|
||||||
recommended!
|
recommended!
|
||||||
|
|
||||||
|
For new projects, spaces are strongly recommended over tabs. Most
|
||||||
|
editors have features that make this easy to do.
|
||||||
|
|
||||||
Maximum Line Length
|
Maximum Line Length
|
||||||
|
|
||||||
There are still many devices around that are limited to 80
|
There are still many devices around that are limited to 80
|
||||||
character lines. The default wrapping on such devices looks ugly.
|
character lines; plus, limiting windows to 80 characters makes it
|
||||||
Therefore, please limit all lines to a maximum of 79 characters
|
possible to have several windows side-by-side. The default
|
||||||
(Emacs wraps lines that are exactly 80 characters long.)
|
wrapping on such devices looks ugly. Therefore, please limit all
|
||||||
|
lines to a maximum of 79 characters (Emacs wraps lines that are
|
||||||
|
exactly 80 characters long.) For flowing long blocks of text
|
||||||
|
(docstrings or comments), limiting the length to 72 characters is
|
||||||
|
recommended.
|
||||||
|
|
||||||
The preferred way of wrapping long lines is by using Python's
|
The preferred way of wrapping long lines is by using Python's
|
||||||
implied line continuation inside parentheses, brackets and braces.
|
implied line continuation inside parentheses, brackets and braces.
|
||||||
|
@ -109,7 +116,7 @@ Code lay-out
|
||||||
sections.
|
sections.
|
||||||
|
|
||||||
Python accepts the control-L (i.e. ^L) form feed character as
|
Python accepts the control-L (i.e. ^L) form feed character as
|
||||||
whitespace; Emacs (and some printing facilities) treat these
|
whitespace; Emacs (and some printing tools) treat these
|
||||||
characters as page separators, so you may use them to separate
|
characters as page separators, so you may use them to separate
|
||||||
pages of related sections of your file.
|
pages of related sections of your file.
|
||||||
|
|
||||||
|
@ -150,7 +157,7 @@ Whitespace in Expressions and Statements
|
||||||
long_variable = 3
|
long_variable = 3
|
||||||
|
|
||||||
(Don't bother to argue with him on any of the above -- Guido's
|
(Don't bother to argue with him on any of the above -- Guido's
|
||||||
grown accustomed to this style over 15 years.)
|
grown accustomed to this style over 20 years.)
|
||||||
|
|
||||||
|
|
||||||
Other Recommendations
|
Other Recommendations
|
||||||
|
|
Loading…
Reference in New Issue