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 #1259750

Change-Id: I52afac28a3248895bb1c012a5934d39e7c2cc5a9
This commit is contained in:
Zhang Jinnan 2013-12-10 16:16:44 -08:00
parent 9a2bd79073
commit bdc296abbc
4 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ class ResponseError(Exception):
def listing_empty(method):
for i in xrange(0, 6):
for i in xrange(6):
if len(method()) == 0:
return True

View File

@ -158,7 +158,7 @@ class TestRateLimit(unittest.TestCase):
def _run(self, callable_func, num, rate, check_time=True):
global time_ticker
begin = time.time()
for x in range(0, num):
for x in range(num):
callable_func()
end = time.time()
total_time = float(num) / rate - 1.0 / rate # 1st request not limited

View File

@ -157,7 +157,7 @@ class TestObjectExpirer(TestCase):
x.swift = InternalClient(containers)
deleted_objects = {}
for i in xrange(0, 3):
for i in xrange(3):
x.process = i
x.run_once()
self.assertNotEqual(deleted_objects, x.deleted_objects)

View File

@ -6881,7 +6881,7 @@ class TestProxyObjectPerformance(unittest.TestCase):
self.obj_len = obj_len
def test_GET_debug_large_file(self):
for i in range(0, 10):
for i in range(10):
start = time.time()
prolis = _test_sockets[0]