summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2016-09-27 04:45:57 (GMT)
committerRaymond Hettinger <python@rcn.com>2016-09-27 04:45:57 (GMT)
commit9016f2864affea83d4d2c02f4396823f8a56b394 (patch)
treebd12f48eed87079bd24d43bace81be5c46c7af21 /Doc
parent22805ca54e1e5db4b66be1b28b0baac2b1b4b4de (diff)
downloadcpython-9016f2864affea83d4d2c02f4396823f8a56b394.zip
cpython-9016f2864affea83d4d2c02f4396823f8a56b394.tar.gz
cpython-9016f2864affea83d4d2c02f4396823f8a56b394.tar.bz2
Issue #18844: Make the number of selections a keyword-only argument for random.choices().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/random.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index 5eb44da..9cb145e 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -124,7 +124,7 @@ Functions for sequences:
Return a random element from the non-empty sequence *seq*. If *seq* is empty,
raises :exc:`IndexError`.
-.. function:: choices(k, population, weights=None, *, cum_weights=None)
+.. function:: choices(population, weights=None, *, cum_weights=None, k=1)
Return a *k* sized list of elements chosen from the *population* with replacement.
If the *population* is empty, raises :exc:`IndexError`.