Message245946
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. |
|
Date |
User |
Action |
Args |
2015-06-29 15:42:25 | jwilk | set | recipients:
+ jwilk, docs@python |
2015-06-29 15:42:25 | jwilk | set | messageid: <1435592545.23.0.229313024646.issue24531@psf.upfronthosting.co.za> |
2015-06-29 15:42:25 | jwilk | link | issue24531 messages |
2015-06-29 15:42:24 | jwilk | create | |
|