1 """Assorted useful combinatorics.
4 from __future__ import generators
7 def xunique_combinations(items, n):
8 """Iterate through unordered, length `n` subsets of `items`.
10 >>> for c in xunique_combinations([1, 2, 3], 2):
18 for i in xrange(len(items)):
19 for cc in xunique_combinations(items[i+1:],n-1):