I've noticed that I can not use all unicode characters in my python source code.
While
def 价(何):
is perfectly allright (albeit nonsensical [probably?]),
def N(N₀, t, λ) -> 'N(t)':
this isn't allowed (the subscript zero that is).
I also can't use some other characters, most of which I recognise as something other than letters (mathematical operators for example). I always thought that if I just stick to the rules I know, i.e. composing names from letters and numbers, with a letter as the first character, all will be okay. Now, the subscript zero is clearly a 'number'. so my impression was wrong.
I know I should avoid using special characters. However, the function definition above (the exponential decay one that is) seems to me perfectly reasonable - because it will never change, and it so elegantly conveys all the information needed for another programmer to use it.
My question therefore, exactly which characters are allowed and which aren't? And where?
Edit
All right I seem not to have been clear enough. I am using python3, so there is no need for declaring the encoding of the source file. Apparent I thought from then fact that my Chinese function definition works.
My question concerns why some characters are allowed there, while others aren't. The subscript zero raises an error, invalid character in identifier, but the blackboard bold zero works. Both equally special I'd say.
I'd like to know if there are any general rules that apply not just to my situation, there must be. It seems that my error is not an accident.
Edit 2:
The answer courtesy of Beau Martínez, pointing me to the language reference, where i should have looked in the first place:
http://www.dcl.hpi.uni-potsdam.de/home/loewis/table-3131.html It appears the characters that are allowed are all chosen.