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

Jeff Shannon jeff at ccvcorp.com
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)
1

Jeff Shannon
Technician/Programmer
Credit International






More information about the Python-list mailing list