4
4
# This module is part of SQLAlchemy and is released under
5
5
# the MIT License: http://www.opensource.org/licenses/mit-license.php
7
7
"""Topological sorting algorithms."""
13
12
__all__ = ['sort', 'sort_as_subsets', 'find_cycles']
15
15
def sort_as_subsets(tuples, allitems):
17
17
edges = util.defaultdict(set)