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 sgrantham
Recipients Jim Fasarakis-Hilliard, ammar2, sgrantham
Date 2017-01-10.17:12:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <4d9a8ccd-df7c-f7c8-edee-0c4a38fd1fe3@walled.net>
In-reply-to <1484066670.64.0.340725373057.issue29226@psf.upfronthosting.co.za>
Content
Thanks Ammar.  Curiously, the comment I had put in my code was a note 
regarding usage and actually didn't contain the word "coding:" but the 
word "encoding:".

# curl -v --header "Transfer-Encoding: chunked" -d @somefile.txt 
"http://localhost:80/"

Perhaps this is a slightly different kind of bug in that the interpreter 
doesn't regex /[^a-zA-Z]coding:/ .  Or a documentation bug. ;)

Simon

On 1/10/2017 11:44 AM, Ammar Askar wrote:
> Ammar Askar added the comment:
>
> This is because the "coding:" in a comment is a special syntax used to define the encoding of the file. The only documentation I could find for it on the official docs is a brief mention here: https://docs.python.org/3/howto/unicode.html#the-string-type
>
> More details can be found on the PEP for it:
> https://www.python.org/dev/peps/pep-0263/
>
> The SyntaxError itself is not a bug, though I think the documentation for this feature is certainly a little sparse.
>
> ----------
> nosy: +ammar2
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue29226>
> _______________________________________
History
Date User Action Args
2017-01-10 17:12:08sgranthamsetrecipients: + sgrantham, ammar2, Jim Fasarakis-Hilliard
2017-01-10 17:12:08sgranthamlinkissue29226 messages
2017-01-10 17:12:07sgranthamcreate