mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
bpo-37000: Remove obsolete comment in _randbelow_with_getrandbits (#95775)
This commit is contained in:
parent
41c939cb35
commit
8a55e2f920
1 changed files with 1 additions and 1 deletions
|
@ -239,7 +239,7 @@ class Random(_random.Random):
|
|||
"Return a random int in the range [0,n). Defined for n > 0."
|
||||
|
||||
getrandbits = self.getrandbits
|
||||
k = n.bit_length() # don't use (n-1) here because n can be 1
|
||||
k = n.bit_length()
|
||||
r = getrandbits(k) # 0 <= r < 2**k
|
||||
while r >= n:
|
||||
r = getrandbits(k)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue