Circular reference problem -- advice?
Courageous
jkraska1 at san.rr.com
Mon Jul 10 22:00:47 EDT 2000
> Don't forget that an instnace's __dict__ doesn't list methods, just data
> members. (instance methods are created on the fly, from the unbound
> versions, and not stored in the instance's __dict__.)
But of course, they *are* in the class object's dict:
>>> class myclass:
def f():
pass
>>> m = myclass()
>>> m.__dict__
{}
>>> myclass.__dict__
{'f': <function f at 833e50>, '__module__': '__console__', '__doc__': None}
>>>
Not sure, but suspect this semantic can't be relied on.
C/
More information about the Python-list
mailing list