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

On Fri, Sep 11, 2015, at 09:36, Steven D'Aprano wrote:
Why is it that people who need deterministic/seed based random aren't considered to be "those whose needs are greater"?

Random832, You appear to have edited the subject line to remove the word "DRAFT". As I explained in an earlier post, that message was a draft and not intended to go to the list. Nevertheless, I will respond to your question below. On Fri, Sep 11, 2015 at 10:23:52AM -0400, random832@fastmail.us wrote:
I didn't say that. Read again: I give three groups of people: - Beginners, who are best served by calling `random.choice` rather than `random.SomethingRandom().choice`. - Those who are experts *and also* have "small" needs. I didn't define "small needs" because (1) I thought it was obvious in context and (2) the post was a draft and still in progress. What I mean by small needs is that they don't care about reproducibility, security, or having multiple independent PRNGs. - Those who *do* have "greater" needs, whether expert or not. Again, I thought in context it would be clear that greater needs includes such things as reproducibility, security or multiple independent PRNGs. In no case that I know of is it a good thing to be creating a brand-new instance for each and every call to the PRNG. At best, it is harmless, and only a little inefficient. At worst, it is a lot inefficient, and potentially may affect the reproducibility, security or statistical properties of the random numbers you generate. -- Steve

On Fri, Sep 11, 2015, at 11:41, Steven D'Aprano wrote:
Sorry about that... I didn't see it until I went to send it, and I'd had some issues on my client causing me to have to fish my reply out of my own drafts folder; I assumed the presence of the word "DRAFT" was related to that and didn't realize it was on your original message.

Random832, You appear to have edited the subject line to remove the word "DRAFT". As I explained in an earlier post, that message was a draft and not intended to go to the list. Nevertheless, I will respond to your question below. On Fri, Sep 11, 2015 at 10:23:52AM -0400, random832@fastmail.us wrote:
I didn't say that. Read again: I give three groups of people: - Beginners, who are best served by calling `random.choice` rather than `random.SomethingRandom().choice`. - Those who are experts *and also* have "small" needs. I didn't define "small needs" because (1) I thought it was obvious in context and (2) the post was a draft and still in progress. What I mean by small needs is that they don't care about reproducibility, security, or having multiple independent PRNGs. - Those who *do* have "greater" needs, whether expert or not. Again, I thought in context it would be clear that greater needs includes such things as reproducibility, security or multiple independent PRNGs. In no case that I know of is it a good thing to be creating a brand-new instance for each and every call to the PRNG. At best, it is harmless, and only a little inefficient. At worst, it is a lot inefficient, and potentially may affect the reproducibility, security or statistical properties of the random numbers you generate. -- Steve

On Fri, Sep 11, 2015, at 11:41, Steven D'Aprano wrote:
Sorry about that... I didn't see it until I went to send it, and I'd had some issues on my client causing me to have to fish my reply out of my own drafts folder; I assumed the presence of the word "DRAFT" was related to that and didn't realize it was on your original message.
participants (2)
-
random832@fastmail.us
-
Steven D'Aprano