summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-01 19:07:28 (GMT)
committerGeorg Brandl <georg@python.org>2010-08-01 19:07:28 (GMT)
commitcaa78fee030f5a832141570ff2b56367059a3ce9 (patch)
tree06d1d6be17495d5d5de343c16a87e4f203ec33ac /Lib/test
parent44c58236d748b3301b0bc6057f8a93d8eeb2ab3c (diff)
downloadcpython-caa78fee030f5a832141570ff2b56367059a3ce9.zip
cpython-caa78fee030f5a832141570ff2b56367059a3ce9.tar.gz
cpython-caa78fee030f5a832141570ff2b56367059a3ce9.tar.bz2
Merged revisions 83371,83390 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r83371 | georg.brandl | 2010-07-31 23:54:24 +0200 (Sa, 31 Jul 2010) | 1 line #8292: Fix three instances of truth tests on return values of filter() (which is always true in Python 3). ........ r83390 | georg.brandl | 2010-08-01 10:07:49 +0200 (So, 01 Aug 2010) | 1 line #8230: make Lib/test/sortperf.py run on Python 3. ........
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/sortperf.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/sortperf.py b/Lib/test/sortperf.py
index 44fc1b0..0ce88de 100644
--- a/Lib/test/sortperf.py
+++ b/Lib/test/sortperf.py
@@ -118,12 +118,12 @@ def tabulate(r):
L = L * (n // 4)
# Force the elements to be distinct objects, else timings can be
# artificially low.
- L = map(lambda x: --x, L)
+ L = list(map(lambda x: --x, L))
doit(L) # ~sort
del L
# All equal. Again, force the elements to be distinct objects.
- L = map(abs, [-0.5] * n)
+ L = list(map(abs, [-0.5] * n))
doit(L) # =sort
del L
@@ -131,11 +131,11 @@ def tabulate(r):
# for an older implementation of quicksort, which used the median
# of the first, last and middle elements as the pivot.
half = n // 2
- L = range(half - 1, -1, -1)
+ L = list(range(half - 1, -1, -1))
L.extend(range(half))
# Force to float, so that the timings are comparable. This is
# significantly faster if we leave tham as ints.
- L = map(float, L)
+ L = list(map(float, L))
doit(L) # !sort
print()