summaryrefslogtreecommitdiffstats
path: root/Lib/whrandom.py
Commit message (Collapse)AuthorAgeFilesLines
* Andrew Kuchling writes:Guido van Rossum1998-02-161-1/+1
| | | | | | | | 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.
* Two improvements suggested by Tim Peters: speed up random() since weGuido van Rossum1997-07-101-8/+5
| | | | | know Python integers are at least 32 bits long; and avoid zeros in initial seed value.
* Properly parenthesize a long Boolean combination. Formerly, you couldGuido van Rossum1997-01-021-1/+1
| | | | pass invalid seed values.
* Change the default seeding -- use 8 bits of sub-second precision andGuido van Rossum1996-10-211-1/+2
| | | | fold in the higest 8 bits of the time as well.
* * Lib/whrandom.py: if seed is (0,0,0), initialize from currentGuido van Rossum1994-09-141-9/+9
| | | | time; default seed's arguments to (0,0,0)
* New way of generating .pyc files, thanks to Sjoerd.Guido van Rossum1994-08-291-1/+1
| | | | | | urllib.py: '+' is not always safe (even though the RFC says so :-( ) whrandom.py: throw away top bits of time to avoid overflow on Mac (where times can be negative)
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-10/+4
|
* * Mass change: get rid of all init() methods, in favor of __init__()Guido van Rossum1993-12-171-3/+2
| | | | | | | constructors. There is no backward compatibility. Not everything has been tested. * aiff.{py,doc}: deleted in favor of aifc.py (which contains its docs as comments)
* * More changes due to stricter argument passing rulesGuido van Rossum1993-01-041-1/+1
| | | | | | * Fixed calendar.py, mimetools.py, whrandom.py to cope with time.time() returning a floating point number. (And fix old bug in calendar) * Add recursion level to mainloop.mainloop(), to make it reentrant.
* Misc changes and new modules. whrandom is "objectified". SOCKET.pyGuido van Rossum1992-10-181-37/+68
| | | | is moved to the sgi subdirectory.
* Initial revisionGuido van Rossum1990-10-131-0/+74