Redundant key list generation on dict iteration

Bug #1384990 reported by Zhongyue Luo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
Low
Zhongyue Luo

Bug Description

There are some cases in the source where redundant key lists are generated for dict iteration.

Using iteritems() lets us iterate a dict more efficiently.

Revision history for this message
Zhongyue Luo (zyluo) wrote :
Changed in sahara:
assignee: nobody → Zhongyue Luo (zyluo)
status: New → In Progress
Changed in sahara:
milestone: none → kilo-1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara (master)

Reviewed: https://review.openstack.org/129824
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=eaace6b740b4e112d9cb4c024a2fe6a6765e0f37
Submitter: Jenkins
Branch: master

commit eaace6b740b4e112d9cb4c024a2fe6a6765e0f37
Author: Zhongyue Luo <email address hidden>
Date: Tue Oct 21 14:46:04 2014 +0800

    Fix dict iteration usage

    When iterating a dict, it is redundant to create a list of keys
    using the keys() method. Using iteritems() lets us iterate a dict more
    efficiently.

    Closes-Bug: #1384990

    Change-Id: If8ffcf19129430506020adb9716a7dfdda9d98f5

Changed in sahara:
status: In Progress → Fix Committed
Changed in sahara:
importance: Medium → Low
Thierry Carrez (ttx)
Changed in sahara:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in sahara:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.