Message6721
Take the following code:
from random import seed, choice
for i in range(1000):
seed(i)
print choice("abcdef"),
In Jython 2.5.2, this produces only letter "e"'s, 1000 after each other.
In Python 2.7.1, this produces a random variation for every seed.
In Jython, higher seeds do work, so using
seed(math.pow(i, 5))
would generate "better" random variations. |
|
Date |
User |
Action |
Args |
2011-11-16 15:05:53 | fdb | set | messageid: <1321455953.56.0.846463378912.issue1817@psf.upfronthosting.co.za> |
2011-11-16 15:05:53 | fdb | set | recipients:
+ fdb |
2011-11-16 15:05:53 | fdb | link | issue1817 messages |
2011-11-16 15:05:53 | fdb | create | |
|