[New-bugs-announce] [issue22048] Add weighted random choice to random package

Dmitry Korchemny report at bugs.python.org
Wed Jul 23 19:08:19 CEST 2014


New submission from Dmitry Korchemny:

Need to have a function for weighted randomization:

given a dictionary: key -> weight (= non-negative number), return a key of the dictionary with the probability proportional to its weight. This capability is basic and is badly missing.

----------
components: Library (Lib)
messages: 223746
nosy: dkorchem
priority: normal
severity: normal
status: open
title: Add weighted random choice to random package
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22048>
_______________________________________


More information about the New-bugs-announce mailing list