Martin Panter added the comment:

If the seed is to be based on time.time(), why not use something based on 
hash(time.time()) to avoid the 1/256 s resolution?

If there is a practical way to get pseudo-random data from the platform, it 
would be better to use that, rather than cooking up our own entropy from 
time.time(), PID, etc. But I guess that depends on the future of os.urandom() 
and friends.

In the meantime, limiting to os.urandom(256) seems reasonable, though I’m not a 
random number or cryptography expert.

----------
nosy: +martin.panter

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27272>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to