diff --git a/Lib/whrandom.py b/Lib/whrandom.py index 8ed39c923cd..3cc15323b55 100644 --- a/Lib/whrandom.py +++ b/Lib/whrandom.py @@ -49,7 +49,8 @@ def seed(self, x = 0, y = 0, z = 0): if 0 == x == y == z: # Initialize from current time import time - t = int(time.time() % 0x80000000) + t = long(time.time() * 256) + t = int((t&0xffffff) | (t>>24)) t, x = divmod(t, 256) t, y = divmod(t, 256) t, z = divmod(t, 256)