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

Jeff Shannon jeff at ccvcorp.com
Wed Aug 22 18:51:09 EDT 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