Hacker News new | ask | show | jobs
by gegenschall 4223 days ago
Well Python 2 "protects" you from silly things like that and throws a syntax error.

  In [4]: class АnotherClass():
     ...:     pass
    File "<ipython-input-4-ad6e67ea5e19>", line 1
      class АnotherClass():
            ^
  SyntaxError: invalid syntax
1 comments

Add a file encoding directive[1] at the begining of your file, and you can shoot at as many of your feet as you want.

[1] PEP 0263: https://www.python.org/dev/peps/pep-0263/

In Python 2 that only works within string literals, though.