En Python, disons que j'ai une chaîne qui contient le nom d'une fonction de classe que je sais qu'un objet particulier aura, comment puis-je l'invoquer ?
C'est-à-dire:
obj = MyClass() # this class has a method doStuff()
func = "doStuff"
# how to call obj.doStuff() using the func variable?