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 christian.heimes, mark.dickinson, pitrou, rhettinger
Date 2013-07-11.07:21:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I concur with Antoine.  A list comprehension is the standard, obvious idiom for making a list from repeated function calls.  

Putting sampling without replacement in its own method makes the operation more opaque than a plain list comprehension (which doesn't need documentation to be clear about how many calls are made, what the output type is, its relationship to random.choice, whether k can be larger than the population, etc).
Date User Action Args
2013-07-11 07:21:28rhettingersetrecipients: + rhettinger, mark.dickinson, pitrou, christian.heimes
2013-07-11 07:21:28rhettingersetmessageid: <>
2013-07-11 07:21:28rhettingerlinkissue18414 messages
2013-07-11 07:21:28rhettingercreate