summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/random.rst2
-rw-r--r--Doc/whatsnew/3.11.rst5
2 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index 96c6300..72881b5 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -257,7 +257,7 @@ Functions for sequences
.. versionchanged:: 3.11
The *population* must be a sequence. Automatic conversion of sets
- to lists is longer supported.
+ to lists is no longer supported.
.. _real-valued-distributions:
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index fe6c2e2..b2fdb48 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -705,6 +705,11 @@ Changes in the Python API
deprecated since Python 3.6.
(Contributed by Serhiy Storchaka in :issue:`47066`.)
+* The *population* parameter of :func:`random.sample` must be a sequence.
+ Automatic conversion of sets to lists is no longer supported. If the sample size
+ is larger than the population size, a :exc:`ValueError` is raised.
+ (Contributed by Raymond Hettinger in :issue:`40465`.)
+
Build Changes
=============