On Wed, 29 Sep 2010 01:41:22 am Peter Otten wrote:

> You should never iterate over a list or dictionary and add or remove
> items to it at the same time. That is a recipe for disaster even if
> it doesn't fail explicitly*
[...]

> (*) I'll leave it to Steven D'Aprano to add the fine print ;)


I'll be satisfied if you merely add the word "almost" between "should" 
and "never" :)



-- 
Steven D'Aprano
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to