示例#1
0
 def __iter__(self):
     return chain.from_iterable(self.sequences)
示例#2
0
 def __reversed__(self):
     return chain.from_iterable(reversed(map(reversed, self.sequences)))
示例#3
0
 def __reversed__(self):
     return chain.from_iterable(reversed(map(reversed, self.sequences)))
示例#4
0
 def union(self, *others):
     return self.__class__(chain.from_iterable((self, ) + others))
示例#5
0
文件: sets.py 项目: MiguelMoll/vFense
 def union(self, *others):
     return self.__class__(chain.from_iterable((self, ) + others))
示例#6
0
 def __iter__(self):
     return chain.from_iterable(self.sequences)
示例#7
0
def test_chain():
    list(chain([1, 2], [3, 4])) == [1, 2, 3, 4]
    list(chain.from_iterable([[1, 2], [3, 4]])) == [1, 2, 3, 4]
示例#8
0
def test_chain():
    Assert(list(chain([1, 2], [3, 4]))) == [1, 2, 3, 4]
    Assert(list(chain.from_iterable([[1, 2], [3, 4]]))) == [1, 2, 3, 4]
示例#9
0
 def __iter__(self):
     return unique(chain.from_iterable(d.iterkeys() for d in self.dicts))
示例#10
0
def test_chain():
    Assert(list(chain([1, 2], [3, 4]))) == [1, 2, 3, 4]
    Assert(list(chain.from_iterable([[1, 2], [3, 4]]))) == [1, 2, 3, 4]
示例#11
0
def test_chain():
    list(chain([1, 2], [3, 4])) == [1, 2, 3, 4]
    list(chain.from_iterable([[1, 2], [3, 4]])) == [1, 2, 3, 4]