Python Metaclasses
April 28, 2010
When you create a class in python, the mechanism used comes from a class called type
. It is possible to subclass from type
and change the create class behaviour.
This example is taken from the Django model form. The model form automatically creates attributes on itself from the model …