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

        Fact must be asserted within the CLIPS engine.

        Equivalent to the CLIPS (modify) function.

        """
        modifier = environment_modifier(self._env, 'fact')
        ret = lib.FMSetFact(modifier, self._fact)
        if ret != lib.FME_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.FMPutSlot(modifier, str(slot).encode(), value)
            if ret != PutSlotError.PSE_NO_ERROR:
                raise PUT_SLOT_ERROR[ret](slot)

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

        Fact must be asserted within the CLIPS engine.

        Equivalent to the CLIPS (modify) function.

        
Modify one or more slot values of the Fact.
Fact must be asserted within the CLIPS engine.

Equivalent to the CLIPS (modify) function.
Modify one or more slot values of the Fact . Fact must be asserted within the CLIPS engine . Equivalent to the CLIPS ( modify ) function .
def modify_slots(self, **slots):
        modifier = environment_modifier(self._env, 'fact')
        ret = lib.FMSetFact(modifier, self._fact)
        if ret != lib.FME_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.FMPutSlot(modifier, str(slot).encode(), value)
            if ret != PutSlotError.PSE_NO_ERROR:
                raise PUT_SLOT_ERROR[ret](slot)
        if lib.FMModify(modifier) is ffi.NULL:
            raise CLIPSError(self._env, code=lib.FBError(self._env))
def modify_slots ( self , ** slots ) : modifier = environment_modifier ( self . _env , 'fact' ) ret = lib . FMSetFact ( modifier , self . _fact ) if ret != lib . FME_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 . FMPutSlot ( modifier , str ( slot ) . encode ( ) , value ) if ret != PutSlotError . PSE_NO_ERROR : raise PUT_SLOT_ERROR [ ret ] ( slot ) if lib . FMModify ( modifier ) is ffi . NULL : raise CLIPSError ( self . _env , code = lib . FBError ( self . _env ) )
Modify one or more slot values of the Fact.
Modify one or more slot values of the Fact .
"""Modify one or more slot values of the Fact.

        Fact must be asserted within the CLIPS engine.

        Equivalent to the CLIPS (modify) function.

        """
self