mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
bpo-40465: Document random module changes in 3.11 What's new (#31818)
This commit is contained in:
parent
3354245daf
commit
12c0012cf9
@ -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:
|
||||
|
@ -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
|
||||
=============
|
||||
|
Loading…
Reference in New Issue
Block a user