[EMAIL PROTECTED] wrote:
I'd like to be able to look up a method name by passing a string with
the method name.
Use getattr:
py> class A(object):
... def f(self):
... pass
... def g(self):
... pass
...
py> class B(A):
... def h(self):
... pass
...
py> getattr(B()
I'd like to be able to look up a method name by passing a string with
the method name. I thought I could use self.__dict__ to get at the
method names, but as my example shows, this is obviously not working.
I've also tried self.__class__.__dict__ without success.
Can anyone point me in the right d