clipspy-0.3.3/clips/data.py
def python_value(self, dtype, dvalue):
        """Convert a CLIPS type into Python."""
        try:
            return CONVERTERS[dtype](dvalue)
        except KeyError:
            if dtype == clips.common.CLIPSType.MULTIFIELD:
                return self.multifield_to_list()
            if dtype == clips.common.CLIPSType.FACT_ADDRESS:
                return clips.facts.new_fact(self._env, lib.to_pointer(dvalue))
            if dtype == clips.common.CLIPSType.INSTANCE_ADDRESS:
                return clips.classes.Instance(self._env, lib.to_pointer(dvalue))

        return None
Convert a CLIPS type into Python.
Convert a CLIPS type into Python.
Convert a CLIPS type into Python .
def python_value(self, dtype, dvalue):
        try:
            return CONVERTERS[dtype](dvalue)
        except KeyError:
            if dtype == clips.common.CLIPSType.MULTIFIELD:
                return self.multifield_to_list()
            if dtype == clips.common.CLIPSType.FACT_ADDRESS:
                return clips.facts.new_fact(self._env, lib.to_pointer(dvalue))
            if dtype == clips.common.CLIPSType.INSTANCE_ADDRESS:
                return clips.classes.Instance(self._env, lib.to_pointer(dvalue))
        return None
def python_value ( self , dtype , dvalue ) : try : return CONVERTERS [ dtype ] ( dvalue ) except KeyError : if dtype == clips . common . CLIPSType . MULTIFIELD : return self . multifield_to_list ( ) if dtype == clips . common . CLIPSType . FACT_ADDRESS : return clips . facts . new_fact ( self . _env , lib . to_pointer ( dvalue ) ) if dtype == clips . common . CLIPSType . INSTANCE_ADDRESS : return clips . classes . Instance ( self . _env , lib . to_pointer ( dvalue ) ) return None
Convert a CLIPS type into Python.
Convert a CLIPS type into Python .
"""Convert a CLIPS type into Python."""
self
dtype
dvalue