Kaydet (Commit) acddff6f authored tarafından Raymond Hettinger's avatar Raymond Hettinger

merge

...@@ -105,7 +105,9 @@ class Random(_random.Random): ...@@ -105,7 +105,9 @@ class Random(_random.Random):
if a is None: if a is None:
try: try:
a = int.from_bytes(_urandom(32), 'big') # Seed with enough bytes to span the 19937 bit
# state space for the Mersenne Twister
a = int.from_bytes(_urandom(2500), 'big')
except NotImplementedError: except NotImplementedError:
import time import time
a = int(time.time() * 256) # use fractional seconds a = int(time.time() * 256) # use fractional seconds
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment