MCPcopy
hub / github.com/dmlc/dgl / __dir__

Method __dir__

python/dgl/_ffi/object.py:41–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

39 """
40
41 def __dir__(self):
42 plist = ctypes.POINTER(ctypes.c_char_p)()
43 size = ctypes.c_uint()
44 check_call(
45 _LIB.DGLObjectListAttrNames(
46 self.handle, ctypes.byref(size), ctypes.byref(plist)
47 )
48 )
49 names = []
50 for i in range(size.value):
51 names.append(py_str(plist[i]))
52 return names
53
54 def __hash__(self):
55 return _api_internal._raw_ptr(self)

Callers

nothing calls this directly

Calls 2

check_callFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected