Inheritance but only partly?

Simon Brunning simon at brunningonline.net
Fri Oct 3 15:29:49 CEST 2008


2008/10/3 Tim Rowe <digitig at gmail.com>:

> As others have said, no. What nobody seems to have said yet is why. If
> Y descends from X, you are saying that Y is an X; that a Y can be used
> anywhere an X can. If Y doesn't support some methods of X then it is
> *not* an X, and *can't* be used anywhere an X can.

See <http://en.wikipedia.org/wiki/Liskov_substitution_principle>.

-- 
Cheers,
Simon B.
simon at brunningonline.net
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues |
Twitter: brunns | Facebook: http://tinyurl.com/6f47zo



More information about the Python-list mailing list