Range() in for loop need a refactor

Bug #1259744 reported by Zhang Xin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
Wishlist
Zhang Xin

Bug Description

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

Zhang Xin (ada-os)
Changed in oslo:
assignee: nobody → Zhang Xin (ada-os)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

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

Changed in oslo:
status: New → In Progress
Ben Nemec (bnemec)
Changed in oslo:
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/61287
Committed: http://github.com/openstack/oslo-incubator/commit/135dd00ccf3b56f9865435f1ab8653c1f5e03229
Submitter: Jenkins
Branch: master

commit 135dd00ccf3b56f9865435f1ab8653c1f5e03229
Author: Zhang Xin <ada.os@99cloud.net>
Date: Tue Dec 10 15:43:32 2013 -0800

    Remove start index 0 in range()

    Remove the useless arg ("start index" = 0) in files, since its default
    value is 0, to make code cleaner.

    Fixes bug #1259744

    Change-Id: I02fc3d96cacdbae1be9e9283362bb87518d97a7c

Changed in oslo:
status: In Progress → Fix Committed
Changed in oslo:
milestone: none → icehouse-2
Thierry Carrez (ttx)
Changed in oslo:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: icehouse-2 → 2014.1
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.