Popular recipes by Peter Russell http://code.activestate.com/recipes/users/4166045/2009-03-23T00:48:54-07:00ActiveState Code RecipesSubclass function (Python)
2009-03-23T00:48:54-07:00Peter Russellhttp://code.activestate.com/recipes/users/4166045/http://code.activestate.com/recipes/576697-subclass-function/
<p style="color: grey">
Python
recipe 576697
by <a href="/recipes/users/4166045/">Peter Russell</a>
(<a href="/recipes/tags/class/">class</a>, <a href="/recipes/tags/metaprogramming/">metaprogramming</a>, <a href="/recipes/tags/subclass/">subclass</a>).
Revision 4.
</p>
<p><strong>Do not use this function - instead use the built in type(name, bases, dict) constructor</strong> This is a function that builds a subclass of some base classes. I wrote it while unaware that type could be used as a constructor.</p>