• Guido van Rossum's avatar
    Andrew Kuchling writes: · 358473c1
    Guido van Rossum yazdı
    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.
    358473c1
whrandom.py 2.39 KB