Message320519
Victor, look at Raymond's patch. In Python 3, `randrange()` and friends already use the all-integer `getrandbits()`. He's changing three other lines, where some variant of `int(random() * someinteger)` is being used in an inner loop for speed.
Presumably the
return int(random() * n)
line in the `n >= maxsize` branch of `_randbelow_without_getrandbits()` should also get clamped. |
|
Date |
User |
Action |
Args |
2018-06-26 22:17:52 | tim.peters | set | recipients:
+ tim.peters, rhettinger, mark.dickinson, pitrou, vstinner, steven.daprano, r.david.murray, skrah, serhiy.storchaka, Serge Anuchin |
2018-06-26 22:17:52 | tim.peters | set | messageid: <1530051472.62.0.56676864532.issue24567@psf.upfronthosting.co.za> |
2018-06-26 22:17:52 | tim.peters | link | issue24567 messages |
2018-06-26 22:17:52 | tim.peters | create | |
|