Stylistic question about inheritance

Stefan Seefeld seefeld at
Thu Mar 31 22:49:02 CEST 2005

Andrew Koenig wrote:

> Of course, there are reasons to have a base class anyway.  For example, I 
> might want it so that type queries such as isinstance(foo, Expr) work.  My 
> question is: Are there other reasons to create a base class when I don't 
> really need it right now?

Coming from C++ myself, I still prefer to use inheritance even if Python
doesn't force me to do it. It's simply a matter of mapping the conceptual
model to the actual design/implementation, if ever possible.


More information about the Python-list mailing list