summaryrefslogtreecommitdiffstats
path: root/Doc/library/graphlib.rst
diff options
context:
space:
mode:
authorandrei kulakov <andrei.avk@gmail.com>2021-06-29 10:54:28 (GMT)
committerGitHub <noreply@github.com>2021-06-29 10:54:28 (GMT)
commit0d7f7975d55eff7e3dfcebd14e765fc6cd7d3e40 (patch)
tree52686063ebb4ac2409eb06eb1fe7d3c1151a7f16 /Doc/library/graphlib.rst
parent6cb145d23f5cf69b6d7414877d142747cd3d134c (diff)
downloadcpython-0d7f7975d55eff7e3dfcebd14e765fc6cd7d3e40.zip
cpython-0d7f7975d55eff7e3dfcebd14e765fc6cd7d3e40.tar.gz
cpython-0d7f7975d55eff7e3dfcebd14e765fc6cd7d3e40.tar.bz2
bpo-42588: Update the docs for the TopologicalSorter.static_order() method (GH-26834)
Diffstat (limited to 'Doc/library/graphlib.rst')
-rw-r--r--Doc/library/graphlib.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/graphlib.rst b/Doc/library/graphlib.rst
index 0faca21..2bc80da 100644
--- a/Doc/library/graphlib.rst
+++ b/Doc/library/graphlib.rst
@@ -154,9 +154,10 @@
.. 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()
@@ -206,4 +207,4 @@ The :mod:`graphlib` module defines the following exception classes:
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.