title: Creating copy of class instance with randomly init variable (python)
body: <p>I need to initialize an instance of a class with a randomly generated number.  I then need to use this instance in several different trials.  However, I am having troubles making exact copies of this instance - the randomly generated number will not stay the same.  Each copy is generating a new random number.</p>
  
  <pre><code>temp = proc(random.randint(min, max))
  tempCpy = copy.copy(temp) #changes on temp interfere with tempCpy
  tempCpy = copy.deepcopy(temp)  #doesn't start with same random number
  </code></pre>