Commits

Adrian Dries committed c757b19

topsort should return pairs

Comments (0)

Files changed (1)

     out = []
     while roots:
         this = roots.pop()
-        out.append(this)
         for node in adjacencies[this]:
+            out.append((this, node))
             incount[node] -= 1
             if not incount[node]:
                 roots.append(node)