Accessing object parent properties

bruno de chez modulix en face bruno at modulix.org
Fri May 26 08:32:51 EDT 2006


> Are you sure you don't want to use a child class for this?

Composition/delegation introduce far less coupling than implementation
inheritance. Inheritance abuse is in fact a well-known OO antipattern.
Since Python makes delegation easy as pie, I don't see any reason to go
for inheritence when it's not really needed (FWIW, you'll notice that
Python class hierarchies tend to be really flat when compared to Java
or like).




More information about the Python-list mailing list