[openstack-dev] [all][python3] use of six.iteritems()

Dolph Mathews dolph.mathews at gmail.com
Thu Jun 11 17:39:09 UTC 2015

On Thu, Jun 11, 2015 at 12:34 AM, Robert Collins <robertc at robertcollins.net>

> On 11 June 2015 at 17:16, Robert Collins <robertc at robertcollins.net>
> wrote:
> > This test conflates setup and execution. Better like my example,
> ...
> Just had it pointed out to me that I've let my inner asshole out again
> - sorry. I'm going to step away from the thread for a bit; my personal
> state (daughter just had a routine but painful operation) shouldn't be
> taken out on other folk, however indirectly.

Ha, no worries. You are completely correct about conflating setup and
execution. As far as I can tell though, even if I isolate the dict setup
from the benchmark, I get the same relative differences in results.
iteritems() was introduced for a reason!

If you don't need to go back to .items()'s copy behavior in py2, then
six.iteritems() seems to be the best general purpose choice.

I think Gordon said it best elsewhere in this thread:

> again, i just want to reiterate, i'm not saying don't use items(), i just
think we should not blindly use items() just as we shouldn't blindly use

> -Rob
> --
> Robert Collins <rbtcollins at hp.com>
> Distinguished Technologist
> HP Converged Cloud
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150611/ebe67a8c/attachment.html>

More information about the OpenStack-dev mailing list