• Raymond Hettinger's avatar
    SF bug #812202: randint is always even · 36bcc805
    Raymond Hettinger authored
    * Added C coded getrandbits(k) method that runs in linear time.
    * Call the new method from randrange() for ranges >= 2**53.
    * Adds a warning for generators not defining getrandbits() whenever they
      have a call to randrange() with too large of a population.
    36bcc805
test_random.py 14.8 KB