➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
标题: _randbelow_with_getrandbits may request an unnecessary random bit
类型: resource usage Stage: resolved
Components: Library (Lib) Versions: Python 3.11
process
状态: closed Resolution: duplicate
Dependencies: 后续: _randbelow_with_getrandbits function inefficient with powers of two
View: 37000
分配给: 抄送列表: lormuc, mark.dickinson
优先级: normal 关键字:

Created on 2021-07-09 20:46 by lormuc, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg397219 - (view) Author: (lormuc) * 日期: 2021-07-09 20:46
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().
msg397225 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) 日期: 2021-07-09 21:09
See #37000 for previous discussion.
历史
日期 用户 动作 参数
2022-04-11 14:59:47admin修改github: 88759
2021-07-12 20:00:39mark.dickinson修改后续: _randbelow_with_getrandbits function inefficient with powers of two
resolution: duplicate
2021-07-09 21:37:33lormuc修改状态: open -> closed
stage: resolved
2021-07-09 21:09:07mark.dickinson修改抄送: + mark.dickinson
消息: + msg397225
2021-07-09 20:46:32lormuc创建