[EMAIL PROTECTED] writes: > obj1 = Obj(params1) > obj2 = Obj(params2) > ... > run() > > The idea is that the run() function inspects the stack, and looks for > object which are instances of class Obj, creates a Bigobj with those > objects and calls its run() method. > > So, any comments on that approach?
Bleeearrrrrggggh!!!! Just make the object initializer remember where the instances are. Or, write something like: newobj = Bigobj() # give Bigobj a __call__ method to create and record an object obj1 = newobj(params1) obj2 = newobj(params2) ... newobj.run() -- http://mail.python.org/mailman/listinfo/python-list