That's neat but two things should be that enumerate isn't automatically applied in Python 2.3 to 2.5 and it doesn't appear to be in 2.6 either.. what version of Python is that code for? You need to explicitly call enumerate() in the versions I tested.
for i, x inenumerate(lots_of_stuff):
process(x)if i %20 == 0:
print"Some progress info"
Last edited by
doug
on Tue, 11th Aug 2009 14:25:46
That's neat but two things should be that enumerate isn't automatically applied in Python 2.3 to 2.5 and it doesn't appear to be in 2.6 either.. what version of Python is that code for? You need to explicitly call enumerate() in the versions I tested.