MCPcopy Create free account
hub / github.com/apache/fory / _is_bound_method_value

Function _is_bound_method_value

python/pyfory/serializer.py:97–103  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

95
96
97def _is_bound_method_value(obj):
98 if isinstance(obj, types.MethodType):
99 return True
100 if isinstance(obj, types.BuiltinMethodType):
101 receiver = getattr(obj, "__self__", None)
102 return receiver is not None and not inspect.ismodule(receiver)
103 return False
104
105
106def _validate_function_value(policy, func, is_local):

Callers 2

_validate_function_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected