clipspy-0.3.3/clips/data.py
def clips_value(self, dvalue):
        """Convert a Python type into CLIPS."""
        try:
            return VALUES[type(dvalue)](self._env, dvalue)
        except KeyError:
            if isinstance(dvalue, (list, tuple)):
                return self.list_to_multifield(dvalue)
            if isinstance(dvalue, (clips.facts.Fact)):
                return dvalue._fact
            if isinstance(dvalue, (clips.classes.Instance)):
                return dvalue._ist

        return ffi.NULL
Convert a Python type into CLIPS.
Convert a Python type into CLIPS.
Convert a Python type into CLIPS .
def clips_value(self, dvalue):
        try:
            return VALUES[type(dvalue)](self._env, dvalue)
        except KeyError:
            if isinstance(dvalue, (list, tuple)):
                return self.list_to_multifield(dvalue)
            if isinstance(dvalue, (clips.facts.Fact)):
                return dvalue._fact
            if isinstance(dvalue, (clips.classes.Instance)):
                return dvalue._ist
        return ffi.NULL
def clips_value ( self , dvalue ) : try : return VALUES [ type ( dvalue ) ] ( self . _env , dvalue ) except KeyError : if isinstance ( dvalue , ( list , tuple ) ) : return self . list_to_multifield ( dvalue ) if isinstance ( dvalue , ( clips . facts . Fact ) ) : return dvalue . _fact if isinstance ( dvalue , ( clips . classes . Instance ) ) : return dvalue . _ist return ffi . NULL
Convert a Python type into CLIPS.
Convert a Python type into CLIPS .
"""Convert a Python type into CLIPS."""
self
dvalue