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>
<https://bugs.python.org/issue39626>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to