On 2/1/2010 3:05 PM, Arnaud Delobelle wrote:
You have itertools.consume which is close to what you want:consume(imap(func, iterable)) # 2.x consume(map(func, iterable)) # 3.x
Consume is not in itertools. It is one of many recipes in the doc (9.7.2). For exhausting an iterator, collections.deque(iterator, maxlen=0).
-- http://mail.python.org/mailman/listinfo/python-list