title: Preferred way of resetting a class in Python
body: <p>Based on <a href="https://codereview.stackexchange.com/a/173505/140805">this post on CodeReview</a>.</p>
  
  <p>I have a class 
  <code>Foo</code> in Python (3), which of course includes a <code>__init__()</code> method. This class fires a couple of prompts and does its thing. Say I want to be able to reset <code>Foo</code> so I can start the procedure all over again.</p>
  
  <p>What would be the preferred implementation?</p>
  
  <p>Calling the <code>__init__()</code> method again</p>
  
  <pre><code>def reset(self):
      self.__init__()
  </code></pre>
  
  <p>or creating a new instance?</p>
  
  <pre><code>def reset(self):
      Foo()
  </code></pre>
  
  <p>I am not sure if creating a new instance of <code>Foo</code> leaves behind anything that might affect performance if <code>reset</code> is called many times. On the other hand <code>__init__()</code> might have side-effects if not all attributes are (re)defined in <code>__init__()</code>.</p>
  
  <p>Is there a preferred way to do this?</p>