In Module 24 you met metaclasses, the heavy tool for changing how classes are made. Most of the time there is a lighter tool that does the job. This lesson collects those: building a class with type, hooks that run when a class is subclassed, decorators on classes, and the inspect module for looking at what code you have. It ends with a clear statement of when to stop, because metaprogramming is powerful and makes code harder to read.
More lessons in Complete Python Programming