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 remi.lapeyre
Recipients belopolsky, christian.heimes, eric.smith, gdr@garethrees.org, martin.panter, pablogsal, remi.lapeyre, rhettinger, terry.reedy, tshepang
Date 2019-01-20.21:42:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548020553.9.0.195786959369.issue17005@roundup.psfhosted.org>
In-reply-to
Content
> 2) Topological sorting usually is well-defined on totally connected graphs, so I do not know what exactly it means to topologically sort two disjoint graphs. This was one of the main drawbacks of the tuple-based approach, but I think it may be a good property.

To give a use-case, I'm currently using topological sort to order a list of tasks where edges represent dependencies between tasks. Sometime a group of tasks does not share a dependency with another group any relative order between those two groups is correct:


A -> B

   C
  / \
 D   E
  \ /
   F

The order (A, B, C, D, E, F) would be correct in this example as would (C, A, E, B, D, F).

I think the general topological sort in Python should be able to handle such inputs.
History
Date User Action Args
2019-01-20 21:42:35remi.lapeyresetrecipients: + remi.lapeyre, rhettinger, terry.reedy, belopolsky, eric.smith, christian.heimes, tshepang, gdr@garethrees.org, martin.panter, pablogsal
2019-01-20 21:42:33remi.lapeyresetmessageid: <1548020553.9.0.195786959369.issue17005@roundup.psfhosted.org>
2019-01-20 21:42:33remi.lapeyrelinkissue17005 messages
2019-01-20 21:42:33remi.lapeyrecreate