In <[EMAIL PROTECTED]>, Hans-Peter Jansen wrote: > class Gen(object): > def records(self, cls): > for i in range(3): > setattr(cls, "id", "%s%s" % (cls.__doc__, i)) > yield cls > > […] > > class GenA(Gen): > def __init__(self): > self.genB = GenB() > > def records(self): > for a in Gen.records(self, A()):
Here you create an instance of `A` and pass that *instance* and not the *class*. If you would pass the class here, you must create objects in `Gen.records()`. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list