Message246530
> I suppose the simplest "fix" would be to replace relevant instances of
>
> int(random() * N)
>
> with
>
> min(int(random() * N), N-1)
That sounds simple and generic. It skews the distribution a tiny little bit, but it doesn't sound significant (perhaps Mark would disagree). |
|
Date |
User |
Action |
Args |
2015-07-09 23:09:18 | pitrou | set | recipients:
+ pitrou, tim.peters, rhettinger, mark.dickinson, vstinner, steven.daprano, r.david.murray, skrah, serhiy.storchaka, Serge Anuchin |
2015-07-09 23:09:18 | pitrou | set | messageid: <1436483358.61.0.159619309477.issue24567@psf.upfronthosting.co.za> |
2015-07-09 23:09:18 | pitrou | link | issue24567 messages |
2015-07-09 23:09:18 | pitrou | create | |
|