Rémi Lapeyre <remi.lape...@henki.fr> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue17005>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to