MCPcopy Create free account
hub / github.com/pybind/pybind11 / getattr

Function getattr

include/pybind11/pytypes.h:906–912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904}
905
906inline object getattr(handle obj, handle name) {
907 PyObject *result = PyObject_GetAttr(obj.ptr(), name.ptr());
908 if (!result) {
909 throw error_already_set();
910 }
911 return reinterpret_steal<object>(result);
912}
913
914inline object getattr(handle obj, const char *name) {
915 PyObject *result = PyObject_GetAttrString(obj.ptr(), name);

Callers 15

test_reference_internalFunction · 0.85
test_valu_getterFunction · 0.85
test_shpFunction · 0.85
test_ptrFunction · 0.85
test_uqpFunction · 0.85
_proxy_dereferenceFunction · 0.85
test_core_fld_commonFunction · 0.85
test_numpy_scalarsFunction · 0.85
_check_propertyFunction · 0.85
wrapFunction · 0.85

Calls 1

ptrMethod · 0.80

Tested by 15

test_reference_internalFunction · 0.68
test_valu_getterFunction · 0.68
test_shpFunction · 0.68
test_ptrFunction · 0.68
test_uqpFunction · 0.68
_proxy_dereferenceFunction · 0.68
test_core_fld_commonFunction · 0.68
test_numpy_scalarsFunction · 0.68
_check_propertyFunction · 0.68
wrapFunction · 0.68