Message99078
This code:
>>> random.seed(b'foo')
>>> random.getrandbits(8)
...repeated 7 more times...
Yields the sequence of values:
amd64: 227, 199, 34, 218, 83, 115, 236, 254
x86: 245, 198, 204, 66, 219, 4, 168, 93
Comments in the source seem to indicate random should produce the same results on all platforms.
I first thought that the seed was not resetting the state correctly, however, if I do a 'random.setstate( (3,(0,)*625,None) )' before seeding the generator, the results do not change from what is given above. Also, calls to getrandbits after the setstate, but before another seed, correctly return 0. It seems from this that seed is resetting the state properly, but some of the internals are not 32bit/64bit consistent. |
|
Date |
User |
Action |
Args |
2010-02-09 00:15:53 | terrence | set | recipients:
+ terrence |
2010-02-09 00:15:53 | terrence | set | messageid: <1265674553.33.0.380899973746.issue7889@psf.upfronthosting.co.za> |
2010-02-09 00:15:51 | terrence | link | issue7889 messages |
2010-02-09 00:15:51 | terrence | create | |
|