summaryrefslogtreecommitdiffstats
path: root/Lib/test/sortperf.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-05-20 17:05:52 (GMT)
committerGuido van Rossum <guido@python.org>1998-05-20 17:05:52 (GMT)
commitb26a1b4e2b99f4473c2133a2206b782a7fa57932 (patch)
treec6fcbbac623adacff0117641975cc75d49f33da5 /Lib/test/sortperf.py
parent33d7f1a76c3544d2901492cfb6fc9db85f2dfbd6 (diff)
downloadcpython-b26a1b4e2b99f4473c2133a2206b782a7fa57932.zip
cpython-b26a1b4e2b99f4473c2133a2206b782a7fa57932.tar.gz
cpython-b26a1b4e2b99f4473c2133a2206b782a7fa57932.tar.bz2
Use random instead of whrandom.
Diffstat (limited to 'Lib/test/sortperf.py')
-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 8355f7a..58fd8a7 100644
--- a/Lib/test/sortperf.py
+++ b/Lib/test/sortperf.py
@@ -7,7 +7,7 @@ See tabulate() for output format.
import sys
import time
-import whrandom
+import random
import marshal
import tempfile
import operator
@@ -23,7 +23,7 @@ def randrange(n):
except IOError:
result = []
for i in range(n):
- result.append(whrandom.random())
+ result.append(random.random())
try:
try:
fp = open(fn, "wb")
@@ -44,7 +44,7 @@ def randrange(n):
##assert len(result) == n
# Shuffle it a bit...
for i in range(10):
- i = whrandom.randint(0, n-1)
+ i = random.randint(0, n-1)
temp = result[:i]
del result[:i]
temp.reverse()
@@ -129,7 +129,7 @@ def main():
y = (y^h^d) & 255
h = h>>8
z = (z^h^d) & 255
- whrandom.seed(x, y, z)
+ random.seed(x, y, z)
r = range(k1, k2+1) # include the end point
tabulate(r)