[issue18844] allow weights in random.choice

Serhiy Storchaka report at bugs.python.org
Sun Sep 1 10:43:40 CEST 2013


Serhiy Storchaka added the comment:

> A more efficient approach for many use-cases would do the precomputation once, returning some kind of 'distribution' object from which samples can be generated.

I like the idea about adding a family of distribution generators. They should check input parameters and make a precomputation and then generate infinite sequence of specially distributed random numbers.

----------

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


More information about the Python-bugs-list mailing list