[Python-Dev] python and super

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Apr 18 00:51:28 CEST 2011


Mark Janssen wrote:
> I have to say it is quite strange to
> me that there is no distinction made between IS-A relationship and
> HAS-A relationships with regard to the issue of Inheritence.

I'm not sure what you mean by that. Inheritance is (or
should be) used only for is-a relationships. Misusing it
for has-a relationships leads to problems.

> Python, confusingly makes no syntactic distinction,

Yes, it does, as long as you use composition instead of
inheritance for has-a relationships.

-- 
Greg


More information about the Python-Dev mailing list