Range() in for loop need a refactor
Bug #1262679 reported by
Liang Bo
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.
Changed in nova: | |
assignee: | nobody → Liang Bo (liang-bo-os) |
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
status: | Triaged → Opinion |
assignee: | Liang Bo (liang-bo-os) → nobody |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/63133
Review: https:/