Ever heard about python metaclasses?
A metaclass is the class of a class. Like a class defines how an instance of the class behaves, a metaclass defines how a class behaves. A class is an instance of a metaclass.
metaclasses make a lot of magic possible. This article describes:
- What metaclasses are
- Why they exists
- How to use them (with code snippets!)
- Why use them
after reading this you’ll be able to understand the magic behind abstract python classes.
P.S: If you’ve ever missed interfaces in python, zope.interfaces uses ABC’s achieve that. twisted blog has a post about that - Why Interfaces Are Great