MCPcopy Index your code
hub / github.com/python/cpython / generic_visit

Method generic_visit

Lib/ast.py:522–530  ·  view source on GitHub ↗

Called if no explicit visitor function exists for a node.

(self, node)

Source from the content-addressed store, hash-verified

520 return visitor(node)
521
522 def generic_visit(self, node):
523 """Called if no explicit visitor function exists for a node."""
524 for field, value in iter_fields(node):
525 if isinstance(value, list):
526 for item in value:
527 if isinstance(item, AST):
528 self.visit(item)
529 elif isinstance(value, AST):
530 self.visit(value)
531
532
533class NodeTransformer(NodeVisitor):

Callers 2

visit_ClassDefMethod · 0.45
visit_FunctionDefMethod · 0.45

Calls 2

visitMethod · 0.95
iter_fieldsFunction · 0.85

Tested by

no test coverage detected