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 serhiy.storchaka
Recipients aisaac, madison.may, mark.dickinson, pitrou, rhettinger, serhiy.storchaka, tim.peters, westley.martinez
Date 2013-09-01.19:16:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378062997.36.0.538625707694.issue18844@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2013-09-01 19:16:37serhiy.storchakasetrecipients: + serhiy.storchaka, tim.peters, rhettinger, mark.dickinson, pitrou, aisaac, westley.martinez, madison.may
2013-09-01 19:16:37serhiy.storchakasetmessageid: <1378062997.36.0.538625707694.issue18844@psf.upfronthosting.co.za>
2013-09-01 19:16:37serhiy.storchakalinkissue18844 messages
2013-09-01 19:16:37serhiy.storchakacreate