[issue33144] random._randbelow optimization
Serhiy Storchaka
report at bugs.python.org
Sat Apr 21 10:45:25 EDT 2018
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
PR 6291 didn't work properly with case 1. Rand2 uses getrandbits() since it is overridden in the parent despites the fact that random() is defined later.
PR 6563 fixes this. It walks classes in method resolution order and finds the first class that defines random() or getrandbits().
PR 6563 also makes tests not using logging for testing purpose.
----------
resolution: fixed ->
stage: resolved -> patch review
status: closed -> open
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33144>
_______________________________________
More information about the Python-bugs-list
mailing list