(evaluator, node)
A decorator to detect recursions in statements. In a recursion a statement
    at the same place, in the same module may not be executed two times.
A decorator to detect recursions in statements. In a recursion a statement
    at the same place, in the same module may not be executed two times.
A decorator to detect recursions in statements . In a recursion a statement at the same place in the same module may not be executed two times .
def execution_allowed(evaluator, node):
    """
    A decorator to detect recursions in statements. In a recursion a statement
    at the same place, in the same module may not be executed two times.
    """
    pushed_nodes = evaluator.recursion_detector.pushed_nodes

    if node in pushed_nodes:
        debug.warning('catched stmt recursion: %s @%s', node,
                      node.start_pos)
        yield False
    else:
        try:
            pushed_nodes.append(node)
            yield True
        finally:
            pushed_nodes.pop()
def execution_allowed ( evaluator , node ) : pushed_nodes = evaluator . recursion_detector . pushed_nodes if node in pushed_nodes : debug . warning ( 'catched stmt recursion: %s @%s' , node , node . start_pos ) yield False else : try : pushed_nodes . append ( node ) yield True finally : pushed_nodes . pop ( )