This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terrence
Recipients terrence
Date 2010-02-09.00:15:51
SpamBayes Score 1.8835261e-06
Marked as misclassified No
Message-id <1265674553.33.0.380899973746.issue7889@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-02-09 00:15:53terrencesetrecipients: + terrence
2010-02-09 00:15:53terrencesetmessageid: <1265674553.33.0.380899973746.issue7889@psf.upfronthosting.co.za>
2010-02-09 00:15:51terrencelinkissue7889 messages
2010-02-09 00:15:51terrencecreate