R. David Murray added the comment: Choice is a very simple function. If it supported sets, it would have to convert the set to a sequence *each time* choice was called. It is probably better to leave this as a task for the user of choice to perform. Sample, on the other hand, does quite a bit of work after doing the conversion, and one is somewhat less likely to call it multiple times on the same input.
I'm not going to close the issue, since my argument here speaks to the implementation rather than the API, so I'm not entirely comfortable with it. I'll let Raymond decide :). ---------- nosy: +r.david.murray, rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17470> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com