bpo-37624: Document weight assumptions for random.choices() (GH-14855) (GH-14858)

(cherry picked from commit 8dbe563aa6)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2019-07-19 02:17:21 -07:00 committed by Raymond Hettinger
parent 840352455d
commit a50a6225a0
1 changed files with 2 additions and 1 deletions

View File

@ -160,7 +160,8 @@ Functions for sequences
The *weights* or *cum_weights* can use any numeric type that interoperates The *weights* or *cum_weights* can use any numeric type that interoperates
with the :class:`float` values returned by :func:`random` (that includes with the :class:`float` values returned by :func:`random` (that includes
integers, floats, and fractions but excludes decimals). integers, floats, and fractions but excludes decimals). Weights are
assumed to be non-negative.
For a given seed, the :func:`choices` function with equal weighting For a given seed, the :func:`choices` function with equal weighting
typically produces a different sequence than repeated calls to typically produces a different sequence than repeated calls to