Skip to content Skip to sidebar Skip to footer
Showing posts with the label Mixins

Calling The Setter Of A Super Class In A Mixin

Suppose I have the following (not quite biologically correct) classes: class AnimalBaseClass: d… Read more Calling The Setter Of A Super Class In A Mixin

Decorators Versus Inheritance

How do you decide between using decorators and inheritance when both are possible? E.g., this probl… Read more Decorators Versus Inheritance

Should A Plugin Adding New Instance-methods Monkey-patch Or Subclass/mixin And Replace The Parent?

As a simple example take a class Polynomial class Polynomial(object): def __init__(self, coeff… Read more Should A Plugin Adding New Instance-methods Monkey-patch Or Subclass/mixin And Replace The Parent?