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