Skip to content

Commit 3ba65cd

Browse files
bpo-42588: Update the docs for the TopologicalSorter.static_order() method (GH-26834) (GH-26952)
(cherry picked from commit 0d7f797) Co-authored-by: andrei kulakov <[email protected]> Co-authored-by: andrei kulakov <[email protected]>
1 parent 0787a1b commit 3ba65cd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/library/graphlib.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,10 @@
154154

155155
.. method:: static_order()
156156

157-
Returns an iterable of nodes in a topological order. Using this method
158-
does not require to call :meth:`TopologicalSorter.prepare` or
159-
:meth:`TopologicalSorter.done`. This method is equivalent to::
157+
Returns an iterator object which will iterate over nodes in a topological
158+
order. When using this method, :meth:`~TopologicalSorter.prepare` and
159+
:meth:`~TopologicalSorter.done` should not be called. This method is
160+
equivalent to::
160161

161162
def static_order(self):
162163
self.prepare()
@@ -206,4 +207,4 @@ The :mod:`graphlib` module defines the following exception classes:
206207
The detected cycle can be accessed via the second element in the :attr:`~CycleError.args`
207208
attribute of the exception instance and consists in a list of nodes, such that each node is,
208209
in the graph, an immediate predecessor of the next node in the list. In the reported list,
209-
the first and the last node will be the same, to make it clear that it is cyclic.
210+
the first and the last node will be the same, to make it clear that it is cyclic.

0 commit comments

Comments
 (0)