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

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?

Mixin Common Fields Between Serializers In Django Rest Framework

I have this: class GenericCharacterFieldMixin(): attributes = serializers.SerializerMethodField… Read more Mixin Common Fields Between Serializers In Django Rest Framework

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