On Tue, Apr 30, 2013 at 1:44 PM, Peter Otten <[email protected]> wrote: > > d.items() --> list(d.items()) > d.iteritems() --> iter(d.items()) > d.viewitems() --> d.items() > > In short: items() and iteritems() were both dropped, and viewitems() was > renamed items().
Following on from this, the iterator types weren't dropped, but iteritems, iterkeys, itervalues were removed from the mapping API. iter(d.items()) returns an item iterator similar to the old d.iteritems(), but the name was corrected from the weird 'dictionary-' prefix to simply 'dict_'. Also, even though it's instantiated by a view, the 3.x iterator references the dict directly, not the view. _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
