Returns an iterable of nodes in a topological order. The particular order that is returned may depend on the specific order in which the items were inserted in the graph. Using this method does not require to call "prepare" or "done". If any cycle is detected, :exc:
(self)
| 240 | return None |
| 241 | |
| 242 | def static_order(self): |
| 243 | """Returns an iterable of nodes in a topological order. |
| 244 | |
| 245 | The particular order that is returned may depend on the specific |
| 246 | order in which the items were inserted in the graph. |
| 247 | |
| 248 | Using this method does not require to call "prepare" or "done". If any |
| 249 | cycle is detected, :exc:`CycleError` will be raised. |
| 250 | """ |
| 251 | self.prepare() |
| 252 | while self.is_active(): |
| 253 | node_group = self.get_ready() |
| 254 | yield from node_group |
| 255 | self.done(*node_group) |
| 256 | |
| 257 | __class_getitem__ = classmethod(GenericAlias) |
| 258 |