[issue24531] please document that no code preceding encoding declaration is allowed

2015-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 08e03dfb7dab by Robert Collins in branch '2.7': Issue #24531: Document that encoding lines cannot follow non-comment lines. https://hg.python.org/cpython/rev/08e03dfb7dab New changeset ab75b7ff4dfe by Robert Collins in branch '3.4': Issue #24531:

[issue24531] please document that no code preceding encoding declaration is allowed

2015-08-06 Thread Robert Collins
Robert Collins added the comment: Thanks, applied across the board; I had to tweak it a little on 2.7. -- nosy: +rbcollins resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue24531] please document that no code preceding encoding declaration is allowed

2015-07-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I moved the existing comment-only sentence to the first paragraph, where I strongly believe it belongs, and added a second about the first. (PS I opened #24563 to address the xxx visible in the patch.) -- keywords: +patch nosy: +terry.reedy stage:

[issue24531] please document that no code preceding encoding declaration is allowed

2015-06-29 Thread Jakub Wilk
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

[issue24531] please document that no code preceding encoding declaration is allowed

2015-06-29 Thread R. David Murray
R. David Murray added the comment: What docs are you looking at? https://docs.python.org/3/reference/lexical_analysis.html#encoding-declarations? I suspect the author thought that If a comment in the first or second line... implied both lines needed to be comments, but I agree that the

[issue24531] please document that no code preceding encoding declaration is allowed

2015-06-29 Thread Jakub Wilk
Jakub Wilk added the comment: Right, I meant https://docs.python.org/3/reference/lexical_analysis.html#encoding-declarations. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24531 ___