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

Ian Cordasco graffatcolmingov at gmail.com
Thu Sep 10 15:44:26 CEST 2015

On Thu, Sep 10, 2015 at 8:13 AM,  <random832 at fastmail.us> wrote:
> On Thu, Sep 10, 2015, at 08:29, Paul Moore wrote:
>> And also, calling the non-crypto choice "Deterministic" is unhelpful,
>> because I *don't* want something deterministic, I want something
>> random (I understand PRNGs aren't truly random, but "good enough for
>> my purposes" is what I want, and "deterministic" reads to me as saying
>> it's *not* good enough...)
> I don't understand why. What other word would you use to describe a
> generator that can be given a specific set of inputs to generate the
> same exact sequence of numbers every single time?
> If you want that feature, then you're not going to think "deterministic"
> means "not good enough". And if you don't want it, you, well, don't want
> it, so there's really no harm in the fact that you don't choose it.
> Personally, though, I don't see why we're not talking about calling it
> MersenneTwister.

Because while we want to reduce foot guns, we don't want to reduce
usability. DeterministicRandom is fairly easy for anyone to
understand. I would venture a guess that most people looking for that
wouldn't know (or care) what the backing algorithm is. Further, if we
stop using mersenne twister in the future, we would have to remove
that class name. DeterministicRandom can be agnostic of the underlying
algorithm and is friendlier to people who don't need to know or care
about what algorithm is generating the numbers, they only need to
understand the properties of that generator.

More information about the Python-ideas mailing list