@fahrenheit.setter def fahrenheit(self, value): self.celsius = (value - 32) * 5/9

class D(B, C): pass

Because classes are objects, you can add methods or attributes to a class after it has been defined.

Suppose you want to ensure that all classes in your framework have a docstring written by developers. You can enforce this using a metaclass.