In working on  
https://github.com/sympy/sympy/pull/1310<https://github.com/sympy/sympy/pull/1310#issuecomment-5953679>
 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

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/U0-l9nLxUkoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to