Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
Thank for the suggestion and patch, but I will decline. To me, the reseviour style algorithm doesn't fit in well (with the slow sorting step and the frequent calls to the random in the key function). For large population sizes (which sample() was designed for), the API and algorithm perform badly. For typical student "urn problems", the better approach is to pre-weight the population by the exact counts specified in the problem. I recommend that you post a recipe for what you want to do, but I don't think the standard library is the place for it. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34227> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com