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

Function iter_child_nodes

Lib/ast.py:294–305  ·  view source on GitHub ↗

Yield all direct child nodes of *node*, that is, all fields that are nodes and all items of fields that are lists of nodes.

(node)

Source from the content-addressed store, hash-verified

292
293
294def iter_child_nodes(node):
295 """
296 Yield all direct child nodes of *node*, that is, all fields that are nodes
297 and all items of fields that are lists of nodes.
298 """
299 for name, field in iter_fields(node):
300 if isinstance(field, AST):
301 yield field
302 elif isinstance(field, list):
303 for item in field:
304 if isinstance(item, AST):
305 yield item
306
307
308def get_docstring(node, clean=True):

Callers 2

_fixFunction · 0.85
walkFunction · 0.85

Calls 1

iter_fieldsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…