Access the methods of a class

Terry Reedy tjreedy at
Sat Nov 1 03:32:32 CET 2003

"Fernando Rodriguez" <frr at> wrote in message
news:1225qv0ehamjpk98bk4hush1tbp6eu3kov at
> Hi,
> I have a base class with a 'sanity-check' method. This method should
> through all the methods and check if they are all 'thunks' (zero
> functions, well actually, 1 parameter: self).

If you want to enforce 'sanity' rather than post-check, you might be
able to use a custom metaclass -- which gets the dictionary of
attributes as an argument.  But that is an expert project not for the
faint of heart.


More information about the Python-list mailing list