[docs] [issue37624] random.choices has unexpected behavior with negative weights

Raymond Hettinger report at bugs.python.org
Fri Jul 19 02:51:49 EDT 2019

Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

We can add a note the the docs that weights are assumed to be non-negative, but I don't want to add an extra O(n) step to check for unusual inputs with undefined meaning -- that would just impair the normal use cases for near zero benefit.

assignee:  -> docs at python
components: +Documentation -Library (Lib)
nosy: +docs at python
priority: normal -> low

Python tracker <report at bugs.python.org>

More information about the docs mailing list