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)
| 292 | |
| 293 | |
| 294 | def 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 | |
| 308 | def get_docstring(node, clean=True): |
no test coverage detected
searching dependent graphs…