Message192847
| 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 |
<1373527288.89.0.0328408828377.issue18414@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年07月11日 07:21:28 | rhettinger | set | recipients:
+ rhettinger, mark.dickinson, pitrou, christian.heimes |
| 2013年07月11日 07:21:28 | rhettinger | set | messageid: <1373527288.89.0.0328408828377.issue18414@psf.upfronthosting.co.za> |
| 2013年07月11日 07:21:28 | rhettinger | link | issue18414 messages |
| 2013年07月11日 07:21:28 | rhettinger | create |
|