New submission from Alan Isaac: The need for weighted random choices is so common that it is addressed as a "common task" in the docs: http://docs.python.org/dev/library/random.html
This enhancement request is to add an optional argument to random.choice, which must be a sequence of non-negative numbers (the weights) having the same length as the main argument. ---------- messages: 196229 nosy: aisaac priority: normal severity: normal status: open title: allow weights in random.choice type: enhancement _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18844> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com