(self, node, *args)
Recursively validate node and all of its children.
Recursively validate node and all of its children.
Recursively validate node and all of its children .
def visit(self, node, *args):
        "Recursively validate node and all of its children."
        def classname(obj):
            return obj.__class__.__name__
        nodename = classname(node)
        fn = getattr(self, 'visit' + nodename, None)
        
        if fn:
            fn(node, *args)
        else:
            if nodename not in ALLOWED_AST_NODES:
                self.fail(node, *args)
            
        for child in node.getChildNodes():
            self.visit(child, *args)
def visit ( self , node , * args ) : def classname ( obj ) : return obj . __class__ . __name__ nodename = classname ( node ) fn = getattr ( self , 'visit' + nodename , None ) if fn : fn ( node , * args ) else : if nodename not in ALLOWED_AST_NODES : self . fail ( node , * args ) for child in node . getChildNodes ( ) : self . visit ( child , * args )