Refactoring similar subclasses

Steven D'Aprano steve at
Sat Sep 11 10:03:56 CEST 2010

On Sat, 11 Sep 2010 08:53:38 +0200, Peter Otten wrote:

> Steven D'Aprano wrote:
>> I have some code that currently takes four different classes, A, B, C
>> and D, and subclasses each of them in the same way:
>> Any suggestions or guidelines?
> You could use a mixin:

Nice! I'll give it a try. I knew that sooner or later I'd find a reason 
for mixins :)


More information about the Python-list mailing list