> def chunked(chunksize,f) : > from itertools import count,groupby > counter=count(chunksize).next > return groupby(f,lambda _ : counter()/chunksize) And more to the point, no "yield" for Alexy to mock :)