Skip to content

Commit 6d63454

Browse files
committed
Document when prepare() can be called
1 parent f32e196 commit 6d63454

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Doc/library/graphlib.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@
106106
function, the graph cannot be modified, and therefore no more nodes can be
107107
added using :meth:`~TopologicalSorter.add`.
108108

109+
A :exc:`ValueError` will be raised if the sort has been started by
110+
:meth:`~.static_order` or :meth:`~.get_ready`.
111+
112+
.. versionchanged:: next
113+
114+
``prepare()`` can now be called more than once as long as the sort has
115+
not started. Previously this raised :exc:`ValueError`.
116+
109117
.. method:: is_active()
110118

111119
Returns ``True`` if more progress can be made and ``False`` otherwise.

0 commit comments

Comments
 (0)