is for reliable?
Jerry Hill
malaclypse2 at gmail.com
Mon May 7 16:20:53 EDT 2007
On 5/7/07, pabloski at giochinternet.com <pabloski at giochinternet.com> wrote:
> for fn in cachefilesSet:
...
> this code stops at the 473th file instead of reaching 1398
This is often caused by mutating the object you are iterating over
inside the for loop. I didn't see anything in the code you posted
that would do that, but you also didn't show us all of your code. Are
you doing anything that would change cachefilesSet inside your for
loop? If so, try looping over a copy of your set instead:
from copy import copy
for fn in copy(cachefilesSet):
...
--
Jerry
More information about the Python-list
mailing list