-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
The graphlib interface requires 5 function calls in order to get the result of a topological sort.
I believe that the most common user will most likely only need a single function call, i.e.
def topological_sort(graph: dict) -> Iterable[set]: ...
I propose adding this small utility function to graphlib.
Note: there is static_order()
, which reduces it to 2 function calls, but it flattens the result, which is a bad default.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
astrojuanlu and Wulian233
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement