def get_module(self): """A `Module` object corresponding to this term, if it is an atom.""" module = module_t() self._require_success_expecting_type( PL_get_module(self._handle, byref(module)), 'atom') return Module._from_handle(module.value)
def get_info(self): """Returns name, arity, and module of this predicate. Returns: Predicate.Info: """ name = atom_t() arity = c_int() module = module_t() PL_predicate_info(self._handle, byref(name), byref(arity), byref(module)) return self.Info(name=Atom._from_handle(name.value), arity=arity.value, module=Module._from_handle(module.value))