summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/random.py')
-rw-r--r--Lib/random.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/random.py b/Lib/random.py
index 16b667a..1f279bb 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -253,7 +253,7 @@ class Random(_random.Random):
if random is None:
random = self.random
- for i in xrange(len(x)-1, 0, -1):
+ for i in reversed(xrange(1, len(x))):
# pick an element in x[:i+1] with which to exchange x[i]
j = int(random() * (i+1))
x[i], x[j] = x[j], x[i]