@deprecated(u'2.1')
def pieces(seq, num=2):
 start = 0
 while 1:
  item = seq[start:(start + num)]
  if (not len(item)):
   break
  (yield item)
  start += num

@ deprecated ( u'2.1' ) def pieces ( seq , num = 2 ) : start = 0 while 1 : item = seq [ start : ( start + num ) ] if ( not len ( item ) ) : break ( yield item ) start += num
break up the *seq* into *num* tuples .