clipspy-1.0.0/clips/classes.py
def modify_slots(self, **slots):
        """Modify one or more slot values of the Instance.

        Instance must exist within the CLIPS engine.

        Equivalent to the CLIPS (modify-instance) function.

        """
        modifier = environment_modifier(self._env, 'instance')
        ret = lib.IMSetInstance(modifier, self._ist)
        if ret != lib.IME_NO_ERROR:
            raise CLIPSError(self._env, code=ret)

        for slot, slot_val in slots.items():
            value = clips.values.clips_value(self._env, value=slot_val)

            ret = lib.IMPutSlot(modifier, str(slot).encode(), value)
            if ret != PutSlotError.PSE_NO_ERROR:
                raise PUT_SLOT_ERROR[ret](slot)

        if lib.IMModify(modifier) is ffi.NULL:
            raise CLIPSError(self._env, code=lib.IMError(self._env))
Modify one or more slot values of the Instance.

        Instance must exist within the CLIPS engine.

        Equivalent to the CLIPS (modify-instance) function.

        
Modify one or more slot values of the Instance.
Instance must exist within the CLIPS engine.

Equivalent to the CLIPS (modify-instance) function.
Modify one or more slot values of the Instance . Instance must exist within the CLIPS engine . Equivalent to the CLIPS ( modify - instance ) function .
def modify_slots(self, **slots):
        modifier = environment_modifier(self._env, 'instance')
        ret = lib.IMSetInstance(modifier, self._ist)
        if ret != lib.IME_NO_ERROR:
            raise CLIPSError(self._env, code=ret)
        for slot, slot_val in slots.items():
            value = clips.values.clips_value(self._env, value=slot_val)
            ret = lib.IMPutSlot(modifier, str(slot).encode(), value)
            if ret != PutSlotError.PSE_NO_ERROR:
                raise PUT_SLOT_ERROR[ret](slot)
        if lib.IMModify(modifier) is ffi.NULL:
            raise CLIPSError(self._env, code=lib.IMError(self._env))
def modify_slots ( self , ** slots ) : modifier = environment_modifier ( self . _env , 'instance' ) ret = lib . IMSetInstance ( modifier , self . _ist ) if ret != lib . IME_NO_ERROR : raise CLIPSError ( self . _env , code = ret ) for slot , slot_val in slots . items ( ) : value = clips . values . clips_value ( self . _env , value = slot_val ) ret = lib . IMPutSlot ( modifier , str ( slot ) . encode ( ) , value ) if ret != PutSlotError . PSE_NO_ERROR : raise PUT_SLOT_ERROR [ ret ] ( slot ) if lib . IMModify ( modifier ) is ffi . NULL : raise CLIPSError ( self . _env , code = lib . IMError ( self . _env ) )
Modify one or more slot values of the Instance.
Modify one or more slot values of the Instance .
"""Modify one or more slot values of the Instance.

        Instance must exist within the CLIPS engine.

        Equivalent to the CLIPS (modify-instance) function.

        """
self