Calling a function or method by name

Jason Orendorff jason at
Wed Jan 23 15:38:27 CET 2002

> In particular, if I have a class with several subclasses, and I 
> want to call a method, how is that done?

method = getattr(object, method_name)

## Jason Orendorff

More information about the Python-list mailing list