.. method:: static_order()
- Returns an iterable of nodes in a topological order. Using this method
- does not require to call :meth:`TopologicalSorter.prepare` or
- :meth:`TopologicalSorter.done`. This method is equivalent to::
+ Returns an iterator object which will iterate over nodes in a topological
+ order. When using this method, :meth:`~TopologicalSorter.prepare` and
+ :meth:`~TopologicalSorter.done` should not be called. This method is
+ equivalent to::
def static_order(self):
self.prepare()
The detected cycle can be accessed via the second element in the :attr:`~CycleError.args`
attribute of the exception instance and consists in a list of nodes, such that each node is,
in the graph, an immediate predecessor of the next node in the list. In the reported list,
- the first and the last node will be the same, to make it clear that it is cyclic.
\ No newline at end of file
+ the first and the last node will be the same, to make it clear that it is cyclic.