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 rhettinger
Recipients Ilya Kamenshchikov, rhettinger
Date 2020-02-14.01:37:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581644247.74.0.680460634534.issue39626@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-02-14 01:37:27rhettingersetrecipients: + rhettinger, Ilya Kamenshchikov
2020-02-14 01:37:27rhettingersetmessageid: <1581644247.74.0.680460634534.issue39626@roundup.psfhosted.org>
2020-02-14 01:37:27rhettingerlinkissue39626 messages
2020-02-14 01:37:27rhettingercreate