def _has_method(arg, method):
 return (hasattr(arg, method) and callable(getattr(arg, method)))

def _has_method ( arg , method ) : return ( hasattr ( arg , method ) and callable ( getattr ( arg , method ) ) )
returns true if the given object has a method with the given name .