In article <b7796993-219d-4f18-aea3-9af95468c...@z31g2000yqd.googlegroups.com>, Emanuele D'Arrigo <man...@gmail.com> wrote: > >Let's say I have a list accessed by two threads, one removing list >items via "del myList[index]" statement the other iterating through >the list and printing out the items via "for item in myList:" >statement. Am I right to say this -won't- generate exceptions because >the list iterator is not concerned with the list changing in size >under its nose? Or are there pitfalls I should be aware of?
Well, I'm not sure about exceptions, but you almost certainly won't get the results you want. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "I support family values -- Addams family values" --www.nancybuttons.com -- http://mail.python.org/mailman/listinfo/python-list