random module gives same results across all configurations?

Chris Rebert clp2 at rebertia.com
Tue Mar 3 22:25:16 EST 2009


On Tue, Mar 3, 2009 at 7:11 PM, Amir Michail <amichail at gmail.com> wrote:
> On Mar 3, 10:05 pm, Chris Rebert <c... at rebertia.com> wrote:
>> On Tue, Mar 3, 2009 at 6:59 PM, Amir Michail <amich... at gmail.com> wrote:
>> > Hi,
>>
>> > Is it the case that the random module will always give the same
>> > results if given the same seed across all configurations (e.g.,
>> > architectures, compilers, etc.)?
>>
>> Your question is vague. Define what you mean by "same results" in this context.
>
> In Python 2.5, if you use the same seed, will calls to randrange yield
> the same numbers across all configurations?

Ah, my apologies, I overlooked part of your original post. My
understanding is that yes, that should be the case (with the possible
exceptions of alternate Python implementations such as Jython and
IronPython, but sounds like you're only talking about CPython).

Cheers,
Chris

-- 
I have a blog:
http://blog.rebertia.com



More information about the Python-list mailing list