Tim Peters <t...@python.org> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue24567>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to