示例#1
0
文件: reducing.py 项目: lcrees/twoq
 def zip(self):
     '''
     smash incoming things into one single thing, pairing things by iterable
     position
     '''
     with self._context():
         return self._xtend(zip(*self._iterable))
示例#2
0
文件: reducing.py 项目: lcrees/twoq
 def pairwise(self):
     '''every two incoming things as a tuple'''
     with self._context():
         i1, i2 = tee(self._iterable)
         next(i2, None)
         return self._xtend(zip(i1, i2))