Re: who to call a list of method inside the class itself

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fredrik Lundh

    Re: who to call a list of method inside the class itself

    Edwin.Madari@Ve rizonWireless.c om wrote:
    1. return string names of required methods in getAllMethod
    return ['method1', 'method2', 'method3']
    2. use gettattr on self and then exetute methods in applyAll
    def applyAll(self):
    for method_name in self.getAllMeth od():
    method = gettattr(self,m ethod_name)
    method() #execute method now
    why?

    </F>

Working...