Class Factories in Python: How?

Andrew Csillag drew.csillag at
Mon May 1 15:33:44 EDT 2000

Sounds like you probably want metaclasses.  See

In short, what metaclasses allow you to do is to turn a class definition
into a function call (at which time you can do whatever).  Warning: it
can make your head explode, but can save a bunch of work if used

More information about the Python-list mailing list