Iterates over all direct child nodes of the node. This iterates over all fields and yields the values of they are nodes. If the value of a field is a list all the nodes in that list are returned.
(self, exclude=None, only=None)
| 162 | pass |
| 163 | |
| 164 | def iter_child_nodes(self, exclude=None, only=None): |
| 165 | """Iterates over all direct child nodes of the node. This iterates |
| 166 | over all fields and yields the values of they are nodes. If the value |
| 167 | of a field is a list all the nodes in that list are returned. |
| 168 | """ |
| 169 | for field, item in self.iter_fields(exclude, only): |
| 170 | if isinstance(item, list): |
| 171 | for n in item: |
| 172 | if isinstance(n, Node): |
| 173 | yield n |
| 174 | elif isinstance(item, Node): |
| 175 | yield item |
| 176 | |
| 177 | def find(self, node_type): |
| 178 | """Find the first node of a given type. If no such node exists the |
no test coverage detected