def __init__(self, x, y, policy): r""" TESTS:: sage: from sage.structure.set_factories_example import XYPairs sage: TestSuite(XYPairs(0,1)).run() """ self._xy = (x, y) ParentWithSetFactory.__init__(self, (x, y), policy=policy, category=EnumeratedSets().Finite())
def __init__(self, y, policy): r""" TESTS:: sage: from sage.structure.set_factories_example import XYPairs sage: TestSuite(XYPairs(y=1)).run() """ self._y = y ParentWithSetFactory.__init__(self, (None, y), policy=policy, category=EnumeratedSets().Finite()) DisjointUnionEnumeratedSets.__init__( self, LazyFamily(range(MAX), self.single_pair), facade=True, keepkey=False, category=self.category()) # TODO remove and fix disjoint union.
def __init__(self, policy): r""" TESTS:: sage: from sage.structure.set_factories_example import XYPairs sage: TestSuite(XYPairs()).run() """ ParentWithSetFactory.__init__(self, (), policy=policy, category=EnumeratedSets().Finite()) DisjointUnionEnumeratedSets.__init__(self, LazyFamily(range(MAX), self.pairs_y), facade=True, keepkey=False, category=self.category())