def __init__(self, character, fun):
        """Store the character and the function.

        Look up the function in the engine's ``sense`` function store,
        if needed.

        """
        if not callable(fun):
            raise TypeError("function is not callable")
        self.character = character
        if isinstance(fun, str):
            self.fun = self.engine.sense[fun]
        else:
            self.fun = fun
def __init__ ( self , character , fun ) : if not callable ( fun ) : raise TypeError ( "function is not callable" ) self . character = character if isinstance ( fun , str ) : self . fun = self . engine . sense [ fun ] else : self . fun = fun
Store the character and the function.

        Look up the function in the engine's ``sense`` function store,
        if needed.