From e9c7c3b90d1f266aebc98a36b1d32a61f7113505 Mon Sep 17 00:00:00 2001 From: Jeremy Heiner Date: Sat, 12 Oct 2013 12:44:35 -0400 Subject: Use Python's "range" instead of deprecated "xrange". Reported by 2to3. Python 3 throws out the old range, renames the old xrange to be the new range, leaving no xrange. A shim could be used, but using the less efficient version does not have a noticeable impact on the run time. This observed (lack of an) effect is as described in the Python 2 docs for xrange. The largest range created is only 1000 elements big, and the memory cost of those ranges is negligible when compared to that of all the pmpkg instances created. Signed-off-by: Jeremy Heiner Signed-off-by: Allan McRae --- test/pacman/tests/xfercommand001.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/pacman/tests/xfercommand001.py') diff --git a/test/pacman/tests/xfercommand001.py b/test/pacman/tests/xfercommand001.py index a645cf7f..0d244dc6 100644 --- a/test/pacman/tests/xfercommand001.py +++ b/test/pacman/tests/xfercommand001.py @@ -7,7 +7,7 @@ numpkgs = 10 pkgnames = [] -for i in xrange(numpkgs): +for i in range(numpkgs): name = "pkg_%s" % i pkgnames.append(name) p = pmpkg(name) -- cgit v1.2.3-54-g00ecf