Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70308

Re: random.seed question (not reproducing same sequence)

From Ned Batchelder <ned@nedbatchelder.com>
Subject Re: random.seed question (not reproducing same sequence)
Date 2014-04-15 20:48 -0400
References <e452de11-1615-4869-8c2a-c2e78a96357c@googlegroups.com> <CAGGBd_o-fwoPSgoTdoAq+JyVaQHYDYfOZ+YhA9rw6vPmT+2vnA@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.9309.1397609303.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 4/15/14 8:07 PM, Dan Stromberg wrote:
> You could easily provide your own random number generator, if you
> don't need cryptographic-strength random numbers.
>
> EG:
> http://stromberg.dnsalias.org/svn/lcgrng/trunk/lcgrng.py
>
> That way you can be certain nothing else is using it.

There's no need to pull in a new implementation.  The stdlib module is 
perfectly willing to give you your own private random number sequence to 
use.

-- 
Ned Batchelder, http://nedbatchelder.com

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

random.seed question (not reproducing same sequence) Nick Mellor <thebalancepro@gmail.com> - 2014-04-15 08:54 -0700
  Re: random.seed question (not reproducing same sequence) John Gordon <gordon@panix.com> - 2014-04-15 16:21 +0000
    Re: random.seed question (not reproducing same sequence) Nick Mellor <thebalancepro@gmail.com> - 2014-04-15 18:05 -0700
      Re: random.seed question (not reproducing same sequence) John Gordon <gordon@panix.com> - 2014-04-16 04:32 +0000
  Re: random.seed question (not reproducing same sequence) Ned Batchelder <ned@nedbatchelder.com> - 2014-04-15 12:36 -0400
  Re: random.seed question (not reproducing same sequence) Peter Otten <__peter__@web.de> - 2014-04-15 19:34 +0200
  Re: random.seed question (not reproducing same sequence) Dan Stromberg <drsalists@gmail.com> - 2014-04-15 17:07 -0700
  Re: random.seed question (not reproducing same sequence) Ned Batchelder <ned@nedbatchelder.com> - 2014-04-15 20:48 -0400

csiph-web