def walk(self, ast):
        "Validate each node in AST and return True if AST is 'safe'."
        self.visit(ast)
        return self.errors == []
Validate each node in AST and return True if AST is 'safe'.
recipes/Python/496746_Restricted_safe_eval/recipe-496746.py