(node)
Prints the AST provided by eulxml.xpath.parse

    Useful for debugging particular expressions
Prints the AST provided by eulxml.xpath.parse
Prints the AST provided by eulxml . xpath . parse
def print_ast(node):
    """Prints the AST provided by eulxml.xpath.parse

    Useful for debugging particular expressions
    """
    def visit(node, indent):
        print("\t" * indent, node)  # noqa

        if hasattr(node, 'left'):
            indent += 1
            visit(node.left, indent)

        if hasattr(node, 'op'):
            print("\t" * indent, "##### {} #####".format(node.op))  # noqa

        if hasattr(node, 'right'):
            visit(node.right, indent)
            indent -= 1

    visit(node, 0)
def print_ast ( node ) : def visit ( node , indent ) : print ( "\t" * indent , node ) # noqa if hasattr ( node , 'left' ) : indent += 1 visit ( node . left , indent ) if hasattr ( node , 'op' ) : print ( "\t" * indent , "##### {} #####" . format ( node . op ) ) # noqa if hasattr ( node , 'right' ) : visit ( node . right , indent ) indent -= 1 visit ( node , 0 )