Require that the encoding declaration is on a line of its own, to simplify

parsing.
This commit is contained in:
Martin v. Löwis 2002-09-03 11:56:15 +00:00
parent ceb037990d
commit f12cda0bc3
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ Defining the Encoding
More precise, the first or second line must match the regular
expression "coding[:=]\s*([\w-_.]+)". The first group of this
expression is then interpreted as encoding name. If the encoding
is unknown to Python, an error is raised during compilation.
is unknown to Python, an error is raised during compilation. There
must not be any Python statement on the line that contains the
encoding declartation.
To aid with platforms such as Windows, which add Unicode BOM marks
to the beginning of Unicode files, the UTF-8 signature