Python Mixins

Terry Reedy tjreedy at
Sat Sep 24 20:31:06 EDT 2011

On 9/24/2011 4:57 AM, Steven D'Aprano wrote:

> Python says is that issubclass(Cat, Yamlafiable) will return True. The
> *interpretation* of that fact is entirely up to you. If you want to
> interpret it as meaning that cats are Yamlafiables, go right ahead. If you
> want to interpret it as a technical result with no semantic meaning, that's
> fine too. After all, just because "ram" in "programming" returns True
> doesn't actually mean anything about male sheep and computing.

Today's comics had a strip in which girl A suggests to girl B that they 
go to a disco to disco-ver someone interesting.

> In fact, even in real life, the ancestor/descendant metaphor creaks. What
> should we make of bacteria which exchange DNA with other species of
> bacteria?

That the human concept of 'species' does not really apply to bacteria.
And similarly, that the CompSci concept of 'class' may also not always 
fit what we want to model.

 > Which is the ancestor and which is the descendant? How about
> symbionts like lichen? What about when we splice genes from one species
> into another? So even in real life, there are multiple inheritance and
> mixins.

Good point.

Terry Jan Reedy

More information about the Python-list mailing list