tags:

views:

29

answers:

1

Sometimes I get errors while coding, because of typing some combination of keys (eg. ALT + SHIFT + SQUARE BRACKET) in a wrong way. So I get Syntax Error in Python, but I can't see where the illegal character is, 'cause Coda do not show it to me. Any solution?

A: 

Python uses the 7-bit ASCII character set for program text. So all you need to do is convert your program to ASCII by going to text > convert to ASCII. Any bad characters will automatically be removed. If you want to specifically know which characters were the bad ones, you can use diff to compare changed and unchanged versions.

Goose Bumper
As of Python 3.0, identifiers may contain non-ASCII unicode characters (PEP3131). http://docs.python.org/release/3.0.1/whatsnew/3.0.html
Paul McGuire
@Paul: Yup, you're absolutely right.
Goose Bumper