summaryrefslogtreecommitdiffstats
path: root/Doc/library/random.rst
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-14 01:00:53 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-01-14 01:00:53 (GMT)
commit1acde190b2676ecfa45d754667df36d6b9c9cc7e (patch)
treee5088a6ec81e2a6677da472c6ae52e15d8036f78 /Doc/library/random.rst
parent28de64fd0fe45475e6d2263eec25c3d19c00074b (diff)
downloadcpython-1acde190b2676ecfa45d754667df36d6b9c9cc7e.zip
cpython-1acde190b2676ecfa45d754667df36d6b9c9cc7e.tar.gz
cpython-1acde190b2676ecfa45d754667df36d6b9c9cc7e.tar.bz2
Take Tim's advice and have random.sample() support only sequences and sets.
Diffstat (limited to 'Doc/library/random.rst')
-rw-r--r--Doc/library/random.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index ff5fb77..f08192d 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -111,8 +111,8 @@ Functions for sequences:
.. function:: sample(population, k)
- Return a *k* length list of unique elements chosen from the population sequence.
- Used for random sampling without replacement.
+ Return a *k* length list of unique elements chosen from the population sequence
+ or set. Used for random sampling without replacement.
Returns a new list containing elements from the population while leaving the
original population unchanged. The resulting list is in selection order so that