[Python-3000] Default dict iterator should have been iteritems() (original) (raw)

Nicholas Bastin nick.bastin at gmail.com
Tue Sep 4 18:52:45 CEST 2007


On 9/4/07, Guido van Rossum <guido at python.org> wrote:

On 9/4/07, Nicholas Bastin <nick.bastin at gmail.com> wrote: > However, all that said, you'd probably > never write the above line of code, and d.iteritems() will continue to > suffice if there are concerns about 'for (k,v) in d' being materially > different than 'if x in d'.

Since this is the python-3000 list, d.items() is what you're looking for.

My mistake, I had referred back to the 3.0 documentation, which still claims that iteritems is a method.

-- Nick



More information about the Python-3000 mailing list