Range() in for loop need a refactor

Bug #1262679 reported by Liang Bo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Low
Unassigned

Bug Description

In some files, range was called as:
    for i in range(0, 10):
        pass
Actually the start index arg was useless, since its defaultvalue is 0.
They should be refactor as:
    for i in range(10):
        pass

Stats in nova codes, range(N) => 230 lines, range(0, N) => 30 lines

range(N) seems more clear and graceful.

Liang Bo (liang-bo-os)
Changed in nova:
assignee: nobody → Liang Bo (liang-bo-os)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/63133

Changed in nova:
status: New → In Progress
Changed in nova:
importance: Undecided → Low
Revision history for this message
Tracy Jones (tjones-i) wrote :

this bug has not been touched in a long time and it's patch(es) are abandoned. Please set back to in progress if you start working on it

Changed in nova:
status: In Progress → Triaged
Sean Dague (sdague)
Changed in nova:
status: Triaged → Opinion
assignee: Liang Bo (liang-bo-os) → nobody
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.