[issue39626] random choice to delegate to sample on sets

2020-02-13 Thread Raymond Hettinger
Raymond Hettinger 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 c

[issue39626] random choice to delegate to sample on sets

2020-02-13 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue39626] random choice to delegate to sample on sets

2020-02-13 Thread Ilya Kamenshchikov
New submission from Ilya Kamenshchikov : In a few of my projects I had this (minor) pain of having to remember which collections of elements are sets and which are [list, tuple]. It causes me to double check and have random.sample(my_set, 1)[0] in many places. To me this is not how I think a