def find_class(self, name): """Find the Class by its name.""" defclass = lib.EnvFindDefclass(self._env, name.encode()) if defclass == ffi.NULL: raise LookupError("Class '%s' not found" % name) return Class(self._env, defclass)
def classes(env, names): for name in names: defclass = lib.EnvFindDefclass(env, name.encode()) if defclass == ffi.NULL: raise CLIPSError(env) yield Class(env, defclass)