Python & unicode
michele.simionato at gmail.com
michele.simionato at gmail.com
Tue Jan 11 09:24:48 EST 2005
Kent:
> I don't think so. You have hacked an attribute with latin-1
characters in it, but you
> haven't actually created an identifier.
No, I really created an identifier. For instance
I can create a global name in this way:
>>> globals()["è"]=1
>>> globals()["è"]
1
> According to the language reference, identifiers can only contain
letters a-z and A-Z,
> digits 0-9 and underscore.
>http://docs.python.org/ref/identifiers.html
The parser has this restriction, so it gets confused if it finds "è".
But the underlying
implementation just works for generic identifiers.
Michele Simionato
More information about the Python-list
mailing list