This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dkorchem
Recipients dkorchem
Date 2014-07-23.17:08:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406135299.72.0.385494554352.issue22048@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-07-23 17:08:19dkorchemsetrecipients: + dkorchem
2014-07-23 17:08:19dkorchemsetmessageid: <1406135299.72.0.385494554352.issue22048@psf.upfronthosting.co.za>
2014-07-23 17:08:19dkorchemlinkissue22048 messages
2014-07-23 17:08:19dkorchemcreate