From: Matthias Görgens Date: Mon, 8 Aug 2022 23:22:26 +0000 (+0800) Subject: bpo-37000: Remove obsolete comment in _randbelow_with_getrandbits (#95775) X-Git-Tag: v3.12.0a1~695 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a55e2f9200288c353937cd5a0b83f0a3e282092;p=thirdparty%2FPython%2Fcpython.git bpo-37000: Remove obsolete comment in _randbelow_with_getrandbits (#95775) --- diff --git a/Lib/random.py b/Lib/random.py index 76627309e288..c70294ee0cbf 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -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)