[issue18844] allow weights in random.choice
Antoine Pitrou
report at bugs.python.org
Sun Aug 10 16:06:02 CEST 2014
Antoine Pitrou added the comment:
I agree with Serhiy. There is nothing "magic" about generators in Python. Also, the concept of an infinite stream of random numbers (or random whatevers) is perfectly common (/dev/urandom being an obvious example); it is not a notion we are inventing.
By contrast, the two-function approach only makes things clumsier for people since they have to remember to combine them.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18844>
_______________________________________
More information about the Python-bugs-list
mailing list