Simple example of how to use ast.NodeVisitor?

Viewed 31521

Does anyone have a simple example using ast.NodeVisitor to walk the abstract syntax tree in Python 2.6? The difference between visit and generic_visit is unclear to me, and I cannot find any example using google codesearch or plain google.

3 Answers
Related