[Python-ideas] Python's Source of Randomness and the random.py module Redux

On 11 September 2015 at 08:54, Andrew Barnert via Python-ideas wrote:Actually, I just thought of an even simpler solution:

Add a deterministic_singleton member to random (which is just initialized to DeterministicRandom() at startup). Now, the user fix is just to change "import random" to "from random import deterministic_singleton as random".

Change the spelling to "import random.seeded_random as random" and theuser fix is even shorter.

I do agree with the idea of continuing to provide a process globalinstance of the current PRNG for ease of migration - changing a singleimport is a good way to be able to address a deprecation, and lookingfor the use of seeded_random in a security sensitive context wouldstill be fairly straightforward.