where is the __dict__ ?
aahz at pythoncraft.com
Thu Sep 19 10:29:02 EDT 2002
In article <3d89b79b$1 at news.sentex.net>,
Peter Hansen <peter at engcorp.com> wrote:
>> my book said all dictionaries have __dict__ method but couldnt find
>> it by using dir(), where is it ?
>Your book is probably wrong, since dictionaries don't have a __dict__
>method. In 2.2 their *classes* do, although dir() still doesn't show
__dict__ is an *attribute*, not a method:
a = 1
x = C()
x.foo = 5
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Project Vote Smart: http://www.vote-smart.org/
More information about the Python-list