clipspy-0.3.3/clips/environment.py
def define_function(self, function, name=None):
        """Define the Python function within the CLIPS environment.

        If a name is given, it will be the function name within CLIPS.
        Otherwise, the name of the Python function will be used.

        The Python function will be accessible within CLIPS via its name
        as if it was defined via the `deffunction` construct.

        """
        name = name if name is not None else function.__name__

        ENVIRONMENT_DATA[self._env].user_functions[name] = function

        self.build(DEFFUNCTION.format(name))
Define the Python function within the CLIPS environment.

        If a name is given, it will be the function name within CLIPS.
        Otherwise, the name of the Python function will be used.

        The Python function will be accessible within CLIPS via its name
        as if it was defined via the `deffunction` construct.

        
Define the Python function within the CLIPS environment.
If a name is given, it will be the function name within CLIPS.
Otherwise, the name of the Python function will be used.

The Python function will be accessible within CLIPS via its name
as if it was defined via the `deffunction` construct.
Define the Python function within the CLIPS environment . If a name is given it will be the function name within CLIPS . Otherwise the name of the Python function will be used . The Python function will be accessible within CLIPS via its name as if it was defined via the ` deffunction ` construct .
def define_function(self, function, name=None):
        name = name if name is not None else function.__name__
        ENVIRONMENT_DATA[self._env].user_functions[name] = function
        self.build(DEFFUNCTION.format(name))
def define_function ( self , function , name = None ) : name = name if name is not None else function . __name__ ENVIRONMENT_DATA [ self . _env ] . user_functions [ name ] = function self . build ( DEFFUNCTION . format ( name ) )
Define the Python function within the CLIPS environment.
Define the Python function within the CLIPS environment .
"""Define the Python function within the CLIPS environment.

        If a name is given, it will be the function name within CLIPS.
        Otherwise, the name of the Python function will be used.

        The Python function will be accessible within CLIPS via its name
        as if it was defined via the `deffunction` construct.

        """
self
function
name