Access the methods of a class

Fernando Rodriguez frr at easyjob.net
Fri Oct 31 11:10:21 EST 2003


Hi,

I have a base class with a 'sanity-check' method. This method should iterate
through all the methods and check if they are all 'thunks' (zero parameter
functions, well actually, 1 parameter: self).

How can I access the list of methods of a given object?  BTW, this class will
be inherited from, so it should work with hte derived classes too.

How can I check the number of parameters of a given function object?

TIA O:-)

PS Any pointers to a python reflection tutorial, would also be appreciated.




More information about the Python-list mailing list