Thanks for sharing! Instead of using meta classes for subclass registration though, please just use __subclass_init__ instead. It’ll often be simpler unless you have a complex use case.
Yes, also for anything else than subclass registration, there are things like the descriptor protocol or class decorators that are likely to be easier to use, debug and understand.
And metaclasses can be any callable, not just class. It's usually better to use a simple function.
And metaclasses can be any callable, not just class. It's usually better to use a simple function.