Metaclasses are awesome.<p>But the moment you put one in your codebase you have a ticking time bomb just waiting to blow up in the face of some unsuspecting programmer who doesn't know how they work. I've seen this in production with Django forms. Someone had to extend a form class and couldn't do it and couldn't figure out why, they had to ask me for help. (We wrote a little factory function to make the form instance first and patch it after but that's damn rude to have to do.)<p>The point is this: there is a <i>HUGE</i> conceptual overhead to using metaclasses, huge. People like me will read GVR's "Killing Joke" article for kicks, because we <i>like</i> the feeling of our brains catching fire and exploding. But junior devs' brains should NOT be exploding at work! (For goodness' sake, he named it after the Python skit with the joke so funny it kills you from laughter, the English use it on the Germans in WWII. He named it that for a reason!)<p>If you want to use metaclasses do it in your own home and wash your hands afterwards.<p>Seriously though, please <i>only</i> use metaclasses in your production code (anything you want other people to use, and that isn't some experiment) if you absolutely cannot think of a simpler, more conventional way to accomplish what you're trying to do.<p>And, really, Python is so powerful and expressive I don't think you will find yourself stumped very often.