[New-bugs-announce] [issue24531] please document that no code preceding encoding declaration is allowed
report at bugs.python.org
Mon Jun 29 17:42:25 CEST 2015
New submission from Jakub Wilk:
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
despite the fact that it appears on a line of its own.
assignee: docs at python
nosy: docs at python, jwilk
title: please document that no code preceding encoding declaration is allowed
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce