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

Function iter_fields

Lib/ast.py:282–291  ·  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

280
281
282def iter_fields(node):
283 """
284 Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields``
285 that is present on *node*.
286 """
287 for field in node._fields:
288 try:
289 yield field, getattr(node, field)
290 except AttributeError:
291 pass
292
293
294def iter_child_nodes(node):

Callers 3

iter_child_nodesFunction · 0.85
generic_visitMethod · 0.85
generic_visitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…