Raymond Hettinger added the comment:

Several thoughts:

* We're not reading urandom "a huge number of times per second".  This is just 
one read of 2,500 bytes.  What Ted is talking about and what we're doing are as 
different as night and day.

* We're also not doing this in a loop.  It is just once when Random() is 
initialized.  There are no threading issues here.

* 32 bytes is good but it is not enough.  There is a reason that the state 
space for the Mersenne Twister is so large to begin with.  Functions as simple 
as shuffle() eat through the possibilities very quickly.

* The "doctor, it hurts" quote is funny, but we don't have any hurt here.  
Running "import os; os.urandom(2500)" takes under a millisecond on my system.

----------

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

Reply via email to