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

Paul Moore p.f.moore at gmail.com
Thu Sep 10 15:44:11 CEST 2015

On 10 September 2015 at 14:10, Donald Stufft <donald at stufft.io> wrote:
>> I don't understand the phrase "if you needed determinism, it would
>> hurt you to say so". Could you clarify?
> I transposed some words, fixed:
> "If you needed determinism, would it hurt you to say so?""


In one sense, no it wouldn't. Nor would it matter to me if "the
default random number generator" was fast and cryptographically
secure. What matters is just that I get a load of random (enough)

What hurts somewhat (not enormously, I'll admit) is up front having to
think about whether I need to be able to capture a seed and replay it.
That's nearly always something I'd think of way down the line, as a
"wouldn't it be nice if I could get the user to send me a reproducible
test case" or something like that. And of course it's just a matter of
switching the underlying RNG at that point.

None of this is hard. But once again, I'm currently using the module
correctly, as documented.

I've omitted most of the rest of your response largely because we're
probably just going to have to agree to differ. I'm probably too worn
out being annoyed at the way that everything ends up needing to be
security related, and the needs of people who won't read the docs
determines API design, to respond clearly and rationally :-(


More information about the Python-ideas mailing list