overriding methods - two questions
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Fri Nov 16 13:19:45 EST 2007
Donn Ingle a écrit :
>> for child in self.childrens:
>> if 'foo' in child.__class__.__dict__:
>> child.foo()
> Bruno, you're the man! I really must take the time to look into all those
> under-under score things!
Knowing Python's object model can help, indeed !-)
Now while this kind of stuff is ok in the low-level parts of a
framework, it shouldn't be seen too much in application code IMHO.
More information about the Python-list
mailing list