This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jwilk
Recipients docs@python, jwilk
Date 2015-06-29.15:42:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1435592545.23.0.229313024646.issue24531@psf.upfronthosting.co.za>
In-reply-to
Content
If the encoding is declared on the second line, the first line must not contain anything except comments. However, this fact is not documented.

The Python Language reference says only that "the encoding declaration must appear on a line of its own";
and PEP 263 says only that "there must not be any Python statement on the line that contains the encoding declaration".

For example, Python ignores this encoding declaration:

spam = True
# encoding=ISO-8859-2

despite the fact that it appears on a line of its own.
History
Date User Action Args
2015-06-29 15:42:25jwilksetrecipients: + jwilk, docs@python
2015-06-29 15:42:25jwilksetmessageid: <1435592545.23.0.229313024646.issue24531@psf.upfronthosting.co.za>
2015-06-29 15:42:25jwilklinkissue24531 messages
2015-06-29 15:42:24jwilkcreate