MCPcopy Index your code
hub / github.com/RustPython/RustPython / iter_fields

Function iter_fields

Lib/ast.py:268–277  ·  view source on GitHub ↗

Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` that is present on *node*.

(node)

Source from the content-addressed store, hash-verified

266
267
268def iter_fields(node):
269 """
270 Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields``
271 that is present on *node*.
272 """
273 for field in node._fields:
274 try:
275 yield field, getattr(node, field)
276 except AttributeError:
277 pass
278
279
280def iter_child_nodes(node):

Callers 3

iter_child_nodesFunction · 0.85
generic_visitMethod · 0.85
generic_visitMethod · 0.85

Calls 1

getattrFunction · 0.85

Tested by

no test coverage detected