- def __init__(self, controller):
- # Armo la lista de subcontrollers
- self.items = []
- for i in controller.__dict__:
- if isinstance(getattr(controller, i),controllers.Controller):
- self.items.append(i)
+ def __init__(self, base):
+ self.base = base
+ self.items = filter(lambda i: isinstance(getattr(base, i), Controller), base.__dict__)