Serhiy Storchaka added the comment:

> Would these distribution generators be implemented internally (see attached 
> patch) or publicly exposed?

See issue18900. Even if this proposition will be rejected I think we should 
publicly expose weighted choice_generator(). A generator or a builder which 
returns function are only ways how efficiently implement this feature. Use 
lru_cache isn't good because several choice generators can be used in a program 
and because it left large data in a cache long time after it was used.

----------

_______________________________________
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

Reply via email to