Searched refs:getrandbits (Results 1 – 15 of 15) sorted by relevance
/third_party/python/Lib/test/ |
D | test_random.py | 357 self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k) 358 self.assertEqual(self.gen.getrandbits(0), 0) 361 getbits = self.gen.getrandbits 374 self.assertRaises(TypeError, self.gen.getrandbits) 375 self.assertRaises(TypeError, self.gen.getrandbits, 1, 2) 376 self.assertRaises(ValueError, self.gen.getrandbits, -1) 377 self.assertRaises(TypeError, self.gen.getrandbits, 10.1) 675 bits100 = self.gen.getrandbits(100) 677 self.assertEqual(self.gen.getrandbits(100), bits100) 788 self.assertEqual(self.gen.getrandbits(100), [all …]
|
D | _test_multiprocessing.py | 4377 d[random.getrandbits(5)] = {Foo() for i in range(10)}
|
/third_party/python/Lib/ |
D | random.py | 244 getrandbits = self.getrandbits 246 r = getrandbits(k) # 0 <= r < 2**k 248 r = getrandbits(k) 287 return self.getrandbits(n * 8).to_bytes(n, 'little') 826 def getrandbits(self, k): member in SystemRandom 879 getrandbits = _inst.getrandbits variable
|
D | secrets.py | 23 randbits = _sysrand.getrandbits
|
D | uuid.py | 612 return random.getrandbits(48) | (1 << 40) 693 clock_seq = random.getrandbits(14) # instead of stable storage
|
/third_party/python/Doc/library/ |
D | random.rst | 39 Optionally, a new generator can supply a :meth:`~Random.getrandbits` method --- this 153 .. function:: getrandbits(k) 158 :meth:`getrandbits` enables :meth:`randrange` to handle arbitrarily large 585 mantissa = 0x10_0000_0000_0000 | self.getrandbits(52) 589 x = self.getrandbits(32)
|
/third_party/python/Lib/email/ |
D | utils.py | 186 randint = random.getrandbits(64)
|
/third_party/python/Misc/NEWS.d/ |
D | 3.7.0b4.rst | 208 consistently even when called from subclasses without a ``getrandbits()``
|
D | 3.6.6rc1.rst | 369 consistently even when called from subclasses without a ``getrandbits()``
|
D | 3.9.0b1.rst | 525 ``randbytes()`` now directly reuses ``getrandbits()``.
|
D | 3.9.0a6.rst | 468 Allow ``random.getrandbits(0)`` to succeed and to return 0.
|
D | 3.8.0a1.rst | 5173 only once at class/subclass instantiation time whether its ``getrandbits()`` 5218 consistently even when called from subclasses without a ``getrandbits()``
|
/third_party/python/Doc/whatsnew/ |
D | 2.4.rst | 1246 * The :mod:`random` module has a new method called ``getrandbits(N)`` that 1248 method now uses :meth:`getrandbits` where appropriate, making generation of
|
D | 3.4.rst | 2040 * :func:`random.getrandbits` is 20%-40% faster for small integers (the most
|
/third_party/python/Misc/ |
D | HISTORY | 5493 - Issue #16674: random.getrandbits() is now 20-40% faster for small integers. 20708 - random.Random has a new method, getrandbits(k), which returns an int
|