Lines Matching refs:Squares
17 class Squares: class
454 self.assertEqual(filter(None, Squares(10)), [1, 4, 9, 16, 25, 36, 49, 64, 81])
455 self.assertEqual(filter(lambda x: x%2, Squares(10)), [1, 9, 25, 49, 81])
458 filter(identity, Squares(5))
772 map(None, Squares(10)),
776 map(int, Squares(10)),
780 map(None, Squares(3), Squares(2)),
784 map(max, Squares(3), Squares(2)),
1193 self.assertEqual(reduce(add, Squares(10)), 285)
1194 self.assertEqual(reduce(add, Squares(10), 0), 285)
1195 self.assertEqual(reduce(add, Squares(0), 0), 0)
1343 self.assertEqual(sum(Squares(10)), 285)
1344 self.assertEqual(sum(iter(Squares(10))), 285)