diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2020-04-19 07:36:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19 07:36:42 (GMT) |
commit | 4fe002045fcf40823154b709fef0948b2bc5e934 (patch) | |
tree | ea9d2c899b682f91fd21f50c13bfae8903f58f11 /Doc/library/random.rst | |
parent | 482259d0dcf27714a84cf56b93977320bea7e093 (diff) | |
download | cpython-4fe002045fcf40823154b709fef0948b2bc5e934.zip cpython-4fe002045fcf40823154b709fef0948b2bc5e934.tar.gz cpython-4fe002045fcf40823154b709fef0948b2bc5e934.tar.bz2 |
bpo-40325: Deprecate set object support in random.sample() (GH-19591)
Diffstat (limited to 'Doc/library/random.rst')
-rw-r--r-- | Doc/library/random.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/random.rst b/Doc/library/random.rst index 9964af4..82e900d 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -230,6 +230,13 @@ Functions for sequences If the sample size is larger than the population size, a :exc:`ValueError` is raised. + .. deprecated:: 3.9 + In the future, the *population* must be a sequence. Instances of + :class:`set` are no longer supported. The set must first be converted + to a :class:`list` or :class:`tuple`, preferably in a deterministic + order so that the sample is reproducible. + + Real-valued distributions ------------------------- |