Python Class Self Object
Question: This may seems a weird question, I have a variable which has the function name
of another class which I have already imported.

Now I have to call that function using self.variable_name(argument)

Is it possible?

    
    
    name = analyser['name']
    analyser_execution = self.name(page_source)
    

It is searching name function but I want it to execute the value which that
name variable have...


Answer: It can be done like this:

    
    
    name = analyser['name']
    analyser_execution = getattr(self, name)(page_source)
    

Or like this:

    
    
    func = getattr(self, analyser['name'])
    analyser_execution = func(page_source)
    

