Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` that is present on *node*.
(node)
| 253 | |
| 254 | |
| 255 | def iter_fields(node): |
| 256 | """ |
| 257 | Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` |
| 258 | that is present on *node*. |
| 259 | """ |
| 260 | for field in node._fields: |
| 261 | try: |
| 262 | yield field, getattr(node, field) |
| 263 | except AttributeError: |
| 264 | pass |
| 265 | |
| 266 | |
| 267 | def iter_child_nodes(node): |
no outgoing calls
no test coverage detected