summaryrefslogtreecommitdiffstats
path: root/Lib/random.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-11-04 01:10:33 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-11-04 01:10:33 (GMT)
commit5e3943317d2442b82ac56eafe29cc7d76ac4f0d2 (patch)
tree94c599c6aef09fcee6168a2ad50bd09d933027b0 /Lib/random.py
parente9d08cf450e342f604fce919c6ae2905d8373881 (diff)
downloadcpython-5e3943317d2442b82ac56eafe29cc7d76ac4f0d2.zip
cpython-5e3943317d2442b82ac56eafe29cc7d76ac4f0d2.tar.gz
cpython-5e3943317d2442b82ac56eafe29cc7d76ac4f0d2.tar.bz2
Issue #15837: add some tests for random.shuffle().
Patch by Alessandro Moura.
Diffstat (limited to 'Lib/random.py')
-rw-r--r--Lib/random.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/random.py b/Lib/random.py
index 6388f29..2ad3809 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -252,10 +252,11 @@ class Random(_random.Random):
return seq[i]
def shuffle(self, x, random=None, int=int):
- """x, random=random.random -> shuffle list x in place; return None.
+ """Shuffle list x in place, and return None.
- Optional arg random is a 0-argument function returning a random
- float in [0.0, 1.0); by default, the standard random.random.
+ Optional argument random is a 0-argument function returning a
+ random float in [0.0, 1.0); if it is the default None, the
+ standard random.random will be used.
"""
randbelow = self._randbelow