Allowing non-ASCII identifiers
Rainer Deyke
rainerd at eldwood.com
Fri Feb 13 18:00:48 EST 2004
Paul Prescod wrote:
> But as an aside, the idea of allowing keywords to also be identifiers
> (with appropriate escaping syntax) is not a bad ones.
You can already have attributes with keywords as names.
>>> class C(object): pass
...
>>> c = C()
>>> setattr(c, "class", 5)
>>> getattr(c, "class")
5
>>>
--
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com
More information about the Python-list
mailing list