[sage-devel] Re: set_random_seed does not seed Python's random number generator

2012-02-24 Thread Nils Bruin
On Feb 24, 3:17 pm, William Stein wrote: [reason for current design] > But what was it?    Since he is MIA, we might not ever know... When you look a little at how Python's random.Random is designed, his design seems a fairly clean solution. Whether it leads to a convenient interface is another q

Re: [sage-devel] Re: set_random_seed does not seed Python's random number generator

2012-02-24 Thread William Stein
On Fri, Feb 24, 2012 at 2:11 PM, Nils Bruin wrote: > On Feb 22, 1:46 pm, William Stein wrote: >> I would think this is an obvious serious bug... but since it seems so >> blatant, maybe I'm missing something. > > See #12580. It looks like it was Witty's design to wrap python's > random rather than

[sage-devel] Re: set_random_seed does not seed Python's random number generator

2012-02-24 Thread Nils Bruin
On Feb 22, 1:46 pm, William Stein wrote: > I would think this is an obvious serious bug... but since it seems so > blatant, maybe I'm missing something. See #12580. It looks like it was Witty's design to wrap python's random rather than set global state immediately. He probably had good reasons t

[sage-devel] Re: set_random_seed does not seed Python's random number generator

2012-02-24 Thread Mariah
This is now trac #12580. Mariah On Feb 22, 4:46 pm, William Stein wrote: > Hi Sage-Devel, > > I was very surprised by this just now: > > sage: import random > sage: random.randint(0,20) > 0 > sage: set_random_seed(0) > sage: random.randint(0,20) > 0 > sage: set_random_seed(0) > sage: random.rand