yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #21666
[Bug 1262679] Re: Range() in for loop need a refactor
** Changed in: nova
Status: Triaged => Opinion
** Changed in: nova
Assignee: Liang Bo (liang-bo-os) => (unassigned)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1262679
Title:
Range() in for loop need a refactor
Status in OpenStack Compute (Nova):
Opinion
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1262679/+subscriptions
References