hasmethod#

deeptrack.utils.hasmethod(obj: Any, method_name: str) bool#

Check if an object has a callable method named method_name.

Returns True if the object has a field named method_name that is callable. Otherwise, returns False.

Parameters#

objAny

The object to inspect.

method_namestr

The name of the method to look for.

Returns#

bool

True if the object has an attribute named method_name that is callable.