summaryrefslogtreecommitdiffstats
path: root/Lib/whrandom.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-08-29 10:52:58 (GMT)
committerGuido van Rossum <guido@python.org>1994-08-29 10:52:58 (GMT)
commit3bb54487675cd28166fc7271b5788b185bcc1b63 (patch)
tree4dd685744d72cedf72db3194a8ffc8f0846d0cfb /Lib/whrandom.py
parent7b1e974b4bd7c17cd90a6d03bab0aaa079d78d29 (diff)
downloadcpython-3bb54487675cd28166fc7271b5788b185bcc1b63.zip
cpython-3bb54487675cd28166fc7271b5788b185bcc1b63.tar.gz
cpython-3bb54487675cd28166fc7271b5788b185bcc1b63.tar.bz2
New way of generating .pyc files, thanks to Sjoerd.
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)
Diffstat (limited to 'Lib/whrandom.py')
-rw-r--r--Lib/whrandom.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/whrandom.py b/Lib/whrandom.py
index 670ca7a..7317b44 100644
--- a/Lib/whrandom.py
+++ b/Lib/whrandom.py
@@ -39,7 +39,7 @@ class whrandom:
if x is None:
# Initialize from current time
import time
- t = int(time.time())
+ t = int(time.time() % 0x80000000)
t, x = divmod(t, 256)
t, y = divmod(t, 256)
t, z = divmod(t, 256)