isinstancemethod#

astropy.utils.introspection.isinstancemethod(cls, obj)[source]#

Deprecated since version 6.1: The isinstancemethod function is deprecated and may be removed in a future version.

Returns True if the given object is an instance method of the class it is defined on (as opposed to a staticmethod or a classmethod).

This requires both the class the object is a member of as well as the object itself in order to make this determination.

Parameters:
clstype

The class on which this method was defined.

objobject

A member of the provided class (the membership is not checked directly, but this function will always return False if the given object is not a member of the given class).