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,, 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 <>
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

* 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:09rhettingersetrecipients: + rhettinger, terry.reedy, belopolsky, eric.smith, christian.heimes, tshepang,, martin.panter, pablogsal, remi.lapeyre
2019-05-26 22:13:09rhettingersetmessageid: <>
2019-05-26 22:13:09rhettingerlinkissue17005 messages
2019-05-26 22:13:09rhettingercreate