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

Method generic_visit

Tools/peg_generator/pegen/grammar.py:18–25  ·  view source on GitHub ↗

Called if no explicit visitor function exists for a node.

(self, node: Iterable[Any], *args: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

16 return visitor(node, *args, **kwargs)
17
18 def generic_visit(self, node: Iterable[Any], *args: Any, **kwargs: Any) -> Any:
19 """Called if no explicit visitor function exists for a node."""
20 for value in node:
21 if isinstance(value, list):
22 for item in value:
23 self.visit(item, *args, **kwargs)
24 else:
25 self.visit(value, *args, **kwargs)
26
27
28class Grammar:

Callers 2

visit_ModuleMethod · 0.45
visit_CallMethod · 0.45

Calls 1

visitMethod · 0.95

Tested by

no test coverage detected