parameterized classes

Michele Simionato michele.simionato at gmail.com
Thu Jul 24 10:37:37 CEST 2008


John Tantalo wrote:
> I really wish I could create a class whose instances were classes that
> subclassed BaseRequestHandler. Is this possible, or is there a better
> way than my approach here? Or am I crazy?

You may use type:

type('MuSubclass', (Base, ), dict(a1=1, a2=2, ...))



More information about the Python-list mailing list