[Tutor] What is a mixin class?

Don Taylor nospamformeSVP at gmail.com
Wed Jan 17 18:51:05 CET 2007

I have a vague idea what a mixin class is, I would like to get a better 
handle on it.

It is a term that is used quite often in Python circles, but I can't 
find a definition.

I guess that because of multiple inheritance Python does not need a 
formal way of specifying mixin classes so I presume that there is some 
conventional interpretation/coding that is followed for mixin classes.

So, what constitutes a mixin class and what are the conventional ways to 
denote them in code?


I notice that Ruby has single inheritance plus mixin classes so maybe 
somebody who knows Ruby could throw some light on in what way a mixin is 
different from normal superclass.

More information about the Tutor mailing list