MCPcopy Index your code
hub / github.com/python/cpython / static_order

Method static_order

Lib/graphlib.py:242–255  ·  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

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

Calls 4

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