Message183808
Currently, random.sample(population, k) raises a ValueError if k is out of the range of [0, len(population)], inclusive. However, the message says "Sample larger than population" even when the real problem is that k < 0. The attached patch fixes that.
The problem exists in all versions of Python that have the random.sample function.
I think I should be adding tests for this, but I don't know in what existing file, if any, this test should go into. |
|
Date |
User |
Action |
Args |
2013-03-09 09:07:29 | Chris.Tandiono | set | recipients:
+ Chris.Tandiono |
2013-03-09 09:07:29 | Chris.Tandiono | set | messageid: <1362820049.53.0.165756235427.issue17388@psf.upfronthosting.co.za> |
2013-03-09 09:07:29 | Chris.Tandiono | link | issue17388 messages |
2013-03-09 09:07:29 | Chris.Tandiono | create | |
|