Author peter.otten
Recipients Muhammad.Alkarouri, georg.brandl, peter.otten, rhettinger
Date 2010-01-23.17:29:10
SpamBayes Score 0.00305638
Marked as misclassified No
Message-id <>
As noted on comp.lang.python the implementation can be simplified to

def consume(items, n):
    next(islice(items, n, n), None)

When I suggested the above I wasn't aware that 

consume(items, None)

should exhaust the entire iterator. Unfortunately I've not found an elegant way to add that functionality.
Date User Action Args
2010-01-23 17:29:12peter.ottensetrecipients: + peter.otten, georg.brandl, rhettinger, Muhammad.Alkarouri
2010-01-23 17:29:12peter.ottensetmessageid: <>
2010-01-23 17:29:10peter.ottenlinkissue7764 messages
2010-01-23 17:29:10peter.ottencreate