Message285134
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>
> _______________________________________ |
|
Date |
User |
Action |
Args |
2017-01-10 17:12:08 | sgrantham | set | recipients:
+ sgrantham, ammar2, Jim Fasarakis-Hilliard |
2017-01-10 17:12:08 | sgrantham | link | issue29226 messages |
2017-01-10 17:12:07 | sgrantham | create | |
|