Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

Thanks for the suggestion.  I think this is close to being a duplicate of 37708 
which was rejected.  For the most part, it was mistake that sample() accepted 
sets.  The implicit conversion has led to surprising performance issues.  If 
that API was being created from scratch, it would not support sets at and would 
require the user to explicitly convert to a sequence.  I do not wish to 
replicate this mistake with choices().

As for delegating to sample(), that doesn't make sense because choices() works 
with replacement and sample() works without replacement.  The two are 
semantically different.

assignee:  -> rhettinger
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list

Reply via email to