[Tutor] Dynamic Method Creation

Kent Johnson kent37 at tds.net
Fri Jul 11 12:08:27 CEST 2008


On Thu, Jul 10, 2008 at 1:38 PM, Chris Fuller
<cfuller084 at thinkingplanet.net> wrote:

> You can also use new.classobj() to create arbitrary classes on-the-fly.  See
> the documentation for the  new module, and google "python metaclasses"

FWIW new.classobj() will create an old-style class. You can create a
new-style class by calling type(  	name, bases, dict) directly.

Kent


More information about the Tutor mailing list