Return true if the object is an instance method. Instance method objects provide these attributes: __doc__ documentation string __name__ name with which this method was defined im_class class object in which this method belongs im_func
(object)
| 11 | |
| 12 | # ----------------------------------------------------------- type-checking |
| 13 | def ismethod(object): |
| 14 | """Return true if the object is an instance method. |
| 15 | |
| 16 | Instance method objects provide these attributes: |
| 17 | __doc__ documentation string |
| 18 | __name__ name with which this method was defined |
| 19 | im_class class object in which this method belongs |
| 20 | im_func function object containing implementation of method |
| 21 | im_self instance to which this method is bound, or None |
| 22 | |
| 23 | """ |
| 24 | return isinstance(object, types.MethodType) |
| 25 | |
| 26 | def isfunction(object): |
| 27 | """Return true if the object is a user-defined function. |