MCPcopy Index your code
hub / github.com/RustPython/RustPython / static_order

Method static_order

Lib/graphlib.py:239–252  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Calls 4

prepareMethod · 0.95
is_activeMethod · 0.95
get_readyMethod · 0.95
doneMethod · 0.95