Clarify indentation policy for old and new files.

This commit is contained in:
Georg Brandl 2008-05-22 18:50:30 +00:00
parent 10bcc45a43
commit 233c85b67a
1 changed files with 7 additions and 10 deletions

View File

@ -46,9 +46,13 @@ C dialect
Code lay-out
- Use single-tab indents, where a tab is worth 8 spaces.
(For Python 3000 and entirely new source files, see the section
Python 3000 below.)
- Use single-tab indents, where a tab is worth 8 spaces, in files
that already use tabs. In new source files, and the few files
that were created after this rule was introduced, use 4-space
indents and no tabs at all.
At some point, the whole codebase may be converted to use only
4-space indents.
- No line should be longer than 79 characters. If this and the
previous rule together don't give you enough room to code, your
@ -194,13 +198,6 @@ Documentation Strings
not all do; the MSVC compiler is known to complain about this.
Python 3000
In Python 3000 (and in the 2.x series, in new source files),
we'll switch to a different indentation style: 4 spaces per indent,
all spaces (no tabs in any file). The rest will remain the same.
References
[1] PEP 8, Style Guide for Python Code, van Rossum, Warsaw