PEP 245: Python interfaces

Alex Martelli aleaxit at yahoo.com
Fri Mar 30 07:42:27 EST 2001


"Carlos Alberto Reis Ribeiro" <cribeiro at mail.inet.com.br> wrote in message
news:mailman.985899166.8262.python-list at python.org...
    [snip]
> For example, there is multiple inheritance. I know very few legitimate
> cases where it is a good idea. Composition usually attains the same
> results, but with less side effects and much better control over the
> process. Interfaces are exceptionally well suited for this kind of
construct.

Multiple inheritance of implementation (mixins) is a highly
convenient and practical programming technique; dunno what
you mean by "legitimate" cases in this context?

Implementation by one object of multiple interfaces (which
is also expressed as multiple-inheritance in C++) is more
than just convenient -- it's a must to enable most decent
modeling techniques ("not relying on absolute taxonomy" is
what I mean by "decent" here:-).

The two issues are quite separate, of course.


Alex






More information about the Python-list mailing list