mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
merge
This commit is contained in:
commit
acddff6f28
1 changed files with 3 additions and 1 deletions
|
@ -105,7 +105,9 @@ class Random(_random.Random):
|
|||
|
||||
if a is None:
|
||||
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:
|
||||
import time
|
||||
a = int(time.time() * 256) # use fractional seconds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue