summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-01 08:07:49 (GMT)
committerGeorg Brandl <georg@python.org>2010-08-01 08:07:49 (GMT)
commitf325e03f4859c5414c054ad56a1a5f10bb1c3c4f (patch)
treedf233fc8aa93efc18fbface34ac492926a43caa9 /Lib
parentf02e7367ebb24d7f3aadb4693697fc85be258507 (diff)
downloadcpython-f325e03f4859c5414c054ad56a1a5f10bb1c3c4f.zip
cpython-f325e03f4859c5414c054ad56a1a5f10bb1c3c4f.tar.gz
cpython-f325e03f4859c5414c054ad56a1a5f10bb1c3c4f.tar.bz2
#8230: make Lib/test/sortperf.py run on Python 3.
Diffstat (limited to 'Lib')
-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()