예제 #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
파일: itools.py 프로젝트: DocHoncho/brownie
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
파일: itools.py 프로젝트: MiguelMoll/vFense
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]