Message98189
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:12 | peter.otten | set | recipients:
+ peter.otten, georg.brandl, rhettinger, Muhammad.Alkarouri |
2010-01-23 17:29:12 | peter.otten | set | messageid: <1264267752.32.0.458118310293.issue7764@psf.upfronthosting.co.za> |
2010-01-23 17:29:10 | peter.otten | link | issue7764 messages |
2010-01-23 17:29:10 | peter.otten | create | |
|