If memory serves me right, Dan Sugalski wrote: > rather than attributes, but I may be incorrect here. Are the current > python instance attributes both: > > *) defined per object rather than per class > *) Essentially global, that is not hidden from parent classes or > anything. (Basically one big pool 'o things attached to the object)
Speaking out of turn .... Python instance stuff is per Object ... And from the looks of it's just a dictionary lookup in the obj.__dict__ dictionary ... So the stuff looks essentially global. eg. class Foo: def __init__(self): pass def toString(self): return self.Name class FooBar(Foo): def __init__(self,name): self.Name=name a=FooBar("hello") print a.toString() ------ hello Gopal PS: considering the fact that non-virtual functions are the only portion holding out the TreeCC Python plugin , I have had quite some heart burn with this. (or I need a switch statement :) -- The difference between insanity and genius is measured by success