MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / iter_child_nodes

Function iter_child_nodes

tools/python-3.11.9-amd64/Lib/ast.py:267–278  ·  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

265
266
267def iter_child_nodes(node):
268 """
269 Yield all direct child nodes of *node*, that is, all fields that are nodes
270 and all items of fields that are lists of nodes.
271 """
272 for name, field in iter_fields(node):
273 if isinstance(field, AST):
274 yield field
275 elif isinstance(field, list):
276 for item in field:
277 if isinstance(item, AST):
278 yield item
279
280
281def get_docstring(node, clean=True):

Callers 2

_fixFunction · 0.85
walkFunction · 0.85

Calls 1

iter_fieldsFunction · 0.70

Tested by

no test coverage detected