Message343584
Attaching some of my 2013 work on this. Here are some API notes:
* spell-out the name topological_sort()
* allow input as ordered pairs like the Unix tsort command
https://en.wikipedia.org/wiki/Tsort#Examples
* allow more convenient input as dependency sequences (like graphviz):
[['a', 'b', 'c', 'x], ['b', 'd', 'e', 'y']]
is short for and equivalent to:
[(a,b), (b,c), (c,x), (b,d), (d, e), (e, y)]
* return both the sorted sequence and cycles
(both are individually useful and the latter
is helpful in debugging in only the former is wanted)
* desire to match the C3 MRO computation
* would like the ordering to be stable and deterministic
(this precludes picking arbitrary elements from sets). |
|
Date |
User |
Action |
Args |
2019-05-26 22:13:09 | rhettinger | set | recipients:
+ rhettinger, terry.reedy, belopolsky, eric.smith, christian.heimes, tshepang, gdr@garethrees.org, martin.panter, pablogsal, remi.lapeyre |
2019-05-26 22:13:09 | rhettinger | set | messageid: <1558908789.87.0.578787996877.issue17005@roundup.psfhosted.org> |
2019-05-26 22:13:09 | rhettinger | link | issue17005 messages |
2019-05-26 22:13:09 | rhettinger | create | |
|