Probably a stupid question... name-->method lookup

Jeff Shannon jeff at
Thu Aug 23 00:51:09 CEST 2001

I should clarify that, of course, hasattr() by itself does not guarantee
that you're finding a method (though neither does the bare eval() shown
above);  you'll have to examine the attribute to determine whether it is
a method or not.  This shouldn't be too difficult, however.

>>> callable(B.Spam)

Jeff Shannon
Credit International

More information about the Python-list mailing list