diff options
Diffstat (limited to 'Lib/random.py')
-rw-r--r-- | Lib/random.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/random.py b/Lib/random.py index 2f2f091..e89fae6 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -108,7 +108,9 @@ class Random(_random.Random): if a is None: try: - a = long(_hexlify(_urandom(32)), 16) + # Seed with enough bytes to span the 19937 bit + # state space for the Mersenne Twister + a = long(_hexlify(_urandom(2500)), 16) except NotImplementedError: import time a = long(time.time() * 256) # use fractional seconds |