43
43
def __init__(self, graph):
44
44
"""Topological sorting of a graph.
46
46
:param graph: sequence of pairs of node_name->parent_names_list.
47
47
i.e. [('C', ['B']), ('B', ['A']), ('A', [])]
48
48
For this input the output from the sort or
49
49
iter_topo_order routines will be:
52
52
node identifiers can be any hashable object, and are typically strings.
54
54
If you have a graph like [('a', ['b']), ('a', ['c'])] this will only use