Commit 8dbe563a authored by Raymond Hettinger's avatar Raymond Hettinger Committed by GitHub

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

parent d3952096
...@@ -160,7 +160,8 @@ Functions for sequences ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment