Message6721

Author fdb
Recipients fdb
Date 2011-11-16.15:05:53
SpamBayes Score 0.0037688052
Marked as misclassified No
Message-id <1321455953.56.0.846463378912.issue1817@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-11-16 15:05:53fdbsetmessageid: <1321455953.56.0.846463378912.issue1817@psf.upfronthosting.co.za>
2011-11-16 15:05:53fdbsetrecipients: + fdb
2011-11-16 15:05:53fdblinkissue1817 messages
2011-11-16 15:05:53fdbcreate