[Python-Dev] __getattribute__ should require a string?
Guido van Rossum
Tue, 04 Dec 2001 08:31:32 -0500
> Is there any reason why people should be allowed to assign and
> retrieve attributes with non-string names?
Not really, but why should we actively try to prevent it when it's
easy to do self.__dict__ = 'a'? This means you can't rely on all
attribute names being strings, and I'm not going to prevent *that*.
The proper fix IMO for the bug you found is to be more careful when
formatting the error message.
--Guido van Rossum (home page: http://www.python.org/~guido/)