[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
Simon Grantham added the comment: My googling skills are a bit amiss too. I searched for some kind of encoding pragma before reporting. Perhaps just a footnote in the basic documentation of a python comment is the easiest solution. Simon On 1/10/2017 12:58 PM, Ammar Askar wrote: > Ammar Ask

[issue29226] Comment generates syntax error

2017-01-10 Thread Ammar Askar
Ammar Askar added the comment: Thanks for the link Jim, looks like my googling skills are a bit amiss. I believe the reason the matching allows "encoding" is because a recommended format in the documentation is: # vim:fileencoding= I think changing the behavior of the matching to be stricter

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
Simon Grantham added the comment: 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 th

[issue29226] Comment generates syntax error

2017-01-10 Thread Ammar Askar
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 det

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
Changes by Simon Grantham : -- type: -> compile error ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
New submission from Simon Grantham: Placing the word "coding:" in a hash tag comment in a file causes a syntax error. Eg: ~ $ cat tst.py # coding: Wow! How odd! ~ $ python tst.py File "tst.py", line 2 SyntaxError: encoding problem: Wow ~ $ -- components: Interpreter Core messages: