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 Ilya Kamenshchikov
Recipients Ilya Kamenshchikov
Date 2020-02-13.12:59:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581598785.79.0.74304854999.issue39626@roundup.psfhosted.org>
In-reply-to
Content
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 and causes friction: conceptually, I know something is a collection and I want 1 random choice from it. Having to differentiate on sequences vs sets makes my code uglier :(

This issue is similar to https://bugs.python.org/issue37708.
History
Date User Action Args
2020-02-13 12:59:45Ilya Kamenshchikovsetrecipients: + Ilya Kamenshchikov
2020-02-13 12:59:45Ilya Kamenshchikovsetmessageid: <1581598785.79.0.74304854999.issue39626@roundup.psfhosted.org>
2020-02-13 12:59:45Ilya Kamenshchikovlinkissue39626 messages
2020-02-13 12:59:45Ilya Kamenshchikovcreate