bpo-40465: Document random module changes in 3.11 What's new (#31818)

This commit is contained in:
Tomáš Hrnčiar 2022-03-24 14:22:58 +01:00 committed by GitHub
parent 3354245daf
commit 12c0012cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -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:

View File

@ -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
=============