2 ms·
In Python you can create a class at "runtime" using "type(name, bases, dict)" as per http://docs.python.org/library/functions.html#type http://docs.python.org/l
by benhoyt 18y ago
In Python you can create a class at "runtime" using "type(name, bases, dict)" as per http://docs.python.org/library/functions.html#type http://docs.python.org/library/functions.html#type
You can also use "new.classobj(name, bases, dict)" -- not quite sure what the difference is.