]> granicus.if.org Git - python/commit
Andrew Kuchling writes:
authorGuido van Rossum <guido@python.org>
Mon, 16 Feb 1998 14:52:42 +0000 (14:52 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 16 Feb 1998 14:52:42 +0000 (14:52 +0000)
commit358473c1a2a692a496bbbeca330c1e4d52fc78b0
tree8fa13b3a6433938b016309b43e1b296835a21bcc
parent1aedbd8b0aabdb2a68748df4d1f10e2577e8d027
Andrew Kuchling writes:

First, the RNG in whrandom.py sucks if you let it seed itself from the time.
The problem is the line:
t = int((t&0xffffff) | (t>>24))
Since it ORs the two parts together, the resulting value has mostly
ON bits.  Change | to ^, and you don't lose any randomness.
Lib/whrandom.py