Add ruling about source code encodings.

This commit is contained in:
Guido van Rossum 2002-10-07 13:40:41 +00:00
parent 1af0493a5d
commit 36a82afee6
1 changed files with 11 additions and 0 deletions

View File

@ -124,6 +124,17 @@ Code lay-out
characters as page separators, so you may use them to separate
pages of related sections of your file.
Encodings (PEP 263)
Code in the core Python distribution should aways use the ASCII or
Latin-1 encoding (a.k.a. ISO-8859-1). Files using ASCII should
not have a coding cookie. Latin-1 should only be used when a
comment or docstring needs to mention an author name that requires
Latin-1; otherwise, using \x escapes is the preferred way to
include non-ASCII data in string literals. An exception is made
for those files that are part of the test suite for the code
implementing PEP 263.
Imports