difference between random module in python 2.6 and 3.2?
mcepl at redhat.com
Mon Feb 6 09:45:30 CET 2012
On 6.2.2012 09:05, Steven D'Aprano wrote:
>> You have persuaded me that the doc should be more explicit that while
>> the basic random.random sequence will be kept repeatable with seed set
>> (except perhaps after a changeover of several releases), the convenience
>> transformations can be changed if improvements are needed or thought
>> sufficiently desirable.
> A more explicit note will help, but the basic problem applies: how do you
> write deterministic tests given that the random.methods (apart from
> random.random itself) can be changed without warning?
Also, how could I write a re-implementation of random.choice which would
work same on python 2.6 and python 3.2? It is not only matter of unit
tests, but I would really welcome if the results on both versions
produce the same results.
Could we get some hint in the release notes?
Thanks for the help,
More information about the Python-list