x.__class__.__dict__[mname](x,*args,**kwargs) here x is an instance of a class FOO FOO has a method "bar" (if the value of mname is "bar") args is a tuple whose length is the number of positional arguments accepted by bar kwargs is a dictionary corresponding to the keyword arguments accepted by bar. Hope this answers your questions. - Murali