How parametrize classes by class data?
Andreas Waldenburger
usenot at geekmail.INVALID
Mon Oct 4 12:05:14 EDT 2010
More information about the Python-list mailing list
Mon Oct 4 12:05:14 EDT 2010
- Previous message (by thread): How parametrize classes by class data?
- Next message (by thread): How parametrize classes by class data?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 4 Oct 2010 15:59:51 +0000 (UTC) kj <no.email at please.post> wrote: > I want to implement a "class of classes", so that, instead of the > usual: > > spam = MyClass(eggs) > > ...I can write > > spam = MyClass(ham)(eggs) Use a factory function: def MyClass(param): class TemplateClass: # Do stuff with param. return TemplateClass /W -- INVALID? DE!
- Previous message (by thread): How parametrize classes by class data?
- Next message (by thread): How parametrize classes by class data?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list