> > For dictionaries we can just iterate over values() or items() as > > opposed to itervalues() or iteritems() since that's technically a copy > > of values or items in the dict, right? > > No! In fact the whole point of iteritems and itervalues and iterkeys is > that they *DO NOT* make copies, so changing the dictionary out from > under them is a programming error. > > If you use dict.items(), dict.keys() or dict.values(), then you're OK, > because these methods *do* create new lists for both.
That's what I meant, it just didn't come across correctly I guess. Thanks for clarifying these issues. I think I have a better understanding now. R -- http://mail.python.org/mailman/listinfo/python-list