← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1262679] [NEW] Range() in for loop need a refactor

 

Public bug reported:

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.

** Affects: nova
     Importance: Undecided
     Assignee: Liang Bo (liang-bo-os)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Liang Bo (liang-bo-os)

-- 
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):
  New

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


Follow ups

References