[issue44593] _randbelow_with_getrandbits may request an unnecessary random bit

2021-07-12 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> duplicate superseder: -> _randbelow_with_getrandbits function inefficient with powers of two ___ Python tracker ___

[issue44593] _randbelow_with_getrandbits may request an unnecessary random bit

2021-07-09 Thread lormuc
Change by lormuc : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue44593] _randbelow_with_getrandbits may request an unnecessary random bit

2021-07-09 Thread Mark Dickinson
Mark Dickinson added the comment: See #37000 for previous discussion. -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bu

[issue44593] _randbelow_with_getrandbits may request an unnecessary random bit

2021-07-09 Thread lormuc
New submission from lormuc : For example, Lib/random.py/Random._randbelow_with_getrandbits(1) should always return 0, as per docstring, but it asks for 1 random bit from getrandbits(). -- components: Library (Lib) messages: 397219 nosy: lormuc priority: normal severity: normal status: