We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7516f26 commit e31f860Copy full SHA for e31f860
Doc/library/random.rst
@@ -162,6 +162,13 @@ Functions for sequences
162
with the :class:`float` values returned by :func:`random` (that includes
163
integers, floats, and fractions but excludes decimals).
164
165
+ For a given seed, the :func:`choices` function with equal weighting
166
+ typically produces a different sequence than repeated calls to
167
+ :func:`choice`. The algorithm used by :func:`choices` uses floating
168
+ point arithmetic for internal consistency and speed. The algorithm used
169
+ by :func:`choice` defaults to integer arithmetic with repeated selections
170
+ to avoid small biases from round-off error.
171
+
172
.. versionadded:: 3.6
173
174
0 commit comments