Refactoring similar subclasses
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Sat Sep 11 04:03:56 EDT 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 :)
--
Steven
More information about the Python-list
mailing list