(self, formula, **kwargs)
Apply function to the node and memoize the result.

        Note: This function assumes that the results for the children
              are already available.
Apply function to the node and memoize the result.
Apply function to the node and memoize the result .
def _compute_node_result(self, formula, **kwargs):
        """Apply function to the node and memoize the result.

        Note: This function assumes that the results for the children
              are already available.
        """
        key = self._get_key(formula, **kwargs)
        if key not in self.memoization:
            try:
                f = self.functions[formula.node_type()]
            except KeyError:
                f = self.walk_error

            args = [self.memoization[self._get_key(s, **kwargs)] \
                    for s in self._get_children(formula)]
            self.memoization[key] = f(formula, args=args, **kwargs)
        else:
            pass
def _compute_node_result ( self , formula , * * kwargs ) : key = self . _get_key ( formula , * * kwargs ) if key not in self . memoization : try : f = self . functions [ formula . node_type ( ) ] except KeyError : f = self . walk_error args = [ self . memoization [ self . _get_key ( s , * * kwargs ) ] for s in self . _get_children ( formula ) ] self . memoization [ key ] = f ( formula , args = args , * * kwargs ) else : pass