Access the methods of a class
From: Fernando Rodriguez (frr_at_easyjob.net)
Date: 10/31/03
- Next message: Alex Martelli: "Re: programming languages (etc) "web popularity" fun"
- Previous message: Fernando Rodriguez: "adding attributes to a function, from within the function"
- Next in thread: Gary Herron: "Re: Access the methods of a class"
- Reply: Gary Herron: "Re: Access the methods of a class"
- Reply: Alex Martelli: "Re: Access the methods of a class"
- Reply: Bengt Richter: "Re: Access the methods of a class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 17:10:21 +0100
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.
- Next message: Alex Martelli: "Re: programming languages (etc) "web popularity" fun"
- Previous message: Fernando Rodriguez: "adding attributes to a function, from within the function"
- Next in thread: Gary Herron: "Re: Access the methods of a class"
- Reply: Gary Herron: "Re: Access the methods of a class"
- Reply: Alex Martelli: "Re: Access the methods of a class"
- Reply: Bengt Richter: "Re: Access the methods of a class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]