Message164742
The docs don't say what happens if you call random.sample() with a population smaller than k. Experimentally, it raises ValueError, but this should be documented.
I would have guessed it would return IndexError, by analogy to random.choice(). |
|
Date |
User |
Action |
Args |
2012-07-06 17:50:45 | roysmith | set | recipients:
+ roysmith, docs@python |
2012-07-06 17:50:45 | roysmith | set | messageid: <1341597045.34.0.429934948335.issue15265@psf.upfronthosting.co.za> |
2012-07-06 17:50:44 | roysmith | link | issue15265 messages |
2012-07-06 17:50:44 | roysmith | create | |
|