This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients belopolsky, christian.heimes, eric.smith, gdr@garethrees.org, martin.panter, pablogsal, remi.lapeyre, rhettinger, terry.reedy, tshepang
Date 2019-05-26.22:13:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1558908789.87.0.578787996877.issue17005@roundup.psfhosted.org>
In-reply-to
Content
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).
History
Date User Action Args
2019-05-26 22:13:09rhettingersetrecipients: + rhettinger, terry.reedy, belopolsky, eric.smith, christian.heimes, tshepang, gdr@garethrees.org, martin.panter, pablogsal, remi.lapeyre
2019-05-26 22:13:09rhettingersetmessageid: <1558908789.87.0.578787996877.issue17005@roundup.psfhosted.org>
2019-05-26 22:13:09rhettingerlinkissue17005 messages
2019-05-26 22:13:09rhettingercreate