In working on
https://github.com/sympy/sympy/pull/1310 I have a suggestion that I throw out as an FYI:
1) when writing a function that utilizes the random module, be sure to provide a seed argument so the function can be tested.
2) don't re-seed the module with the seed, create a new instance:
yes
if seed is not None:
rand = random.Random(seed)
else:
rand = random
...
rand.randint(1, 10) # or whatever
no
random.seed(seed)
...
random.randint(1, 10)
3) If you want the same behavior of random features for a given seed in py 2.5 through 3.2 please review the cited pull request. :-)
/c