Lines Matching refs:groupby

361 …            noruns = [k for k,v in groupby(c)]                  # combo without consecutive repeats
708 self.assertEqual([], list(groupby([])))
709 self.assertEqual([], list(groupby([], key=id)))
710 self.assertRaises(TypeError, list, groupby('abc', []))
711 self.assertRaises(TypeError, groupby, None)
712 self.assertRaises(TypeError, groupby, 'abc', lambda x:x, 10)
718 for k, g in groupby(s, lambda r:r[0]):
727 for k, g in pickle.loads(pickle.dumps(groupby(s, testR), proto)):
735 for k, g in groupby(s, testR):
736 for ik, ig in groupby(g, testR2):
746 for k, g in pickle.loads(pickle.dumps(groupby(s, testR), proto)):
747 for ik, ig in pickle.loads(pickle.dumps(groupby(g, testR2), proto)):
756 keys = [k for k, g in groupby(s, testR)]
764 it = groupby(s, testR)
775 it = groupby(s, testR)
784 r = [k for k, g in groupby(sorted(s))]
787 r = [k for k, g in groupby(sorted(s)) if list(islice(g,1,2))]
790 r = [(len(list(g)), k) for k, g in groupby(sorted(s))]
793 r = sorted([(len(list(g)) , k) for k, g in groupby(sorted(s))], reverse=True)[:3]
804 return [func(g) for k, g in groupby(iterable, keyp)]
1537 for f in (chain, cycle, zip, groupby):
1616 self.assertEqual([k for k, g in groupby('AAAABBBCCDAABBB')],
1618 self.assertEqual([(list(g)) for k, g in groupby('AAAABBBCCD')],
1755 self.makecycle(groupby([a]*2, lambda x:x), a)
1761 for i, j in groupby(range(n), key=keyfunc):
1938 self.assertEqual([k for k, sb in groupby(g(s))], list(g(s)))
1939 self.assertRaises(TypeError, groupby, X(s))
1940 self.assertRaises(TypeError, groupby, N(s))
1941 self.assertRaises(ZeroDivisionError, list, groupby(E(s)))
2128 for (k, b) in groupby(range(10), f):
2142 g = next(groupby(range(10), K))[1]