In Python I need to efficiently and generically test whether an attribute of a class is an instance method. The inputs to the call would be the name of the attribute being check
You can use the inspect module:
inspect
class A(object): def method_name(self): pass import inspect print inspect.ismethod(getattr(A, 'method_name')) # prints True a = A() print inspect.ismethod(getattr(a, 'method_name')) # prints True