title: How to delete a python object or how to create a new object with the same name (overwritting the old)?
body: <p>
  I want to delete or overwrite a python object.</p>
  
  <p>First, here is simple class.</p>
  
  <pre><code>&gt;&gt;&gt; def Myclass():
  ...    def __init__(self, name, value=[]):
  ...        self.name = name
  ...        self.value = value
  ...
  </code></pre>
  
  <p>Then I create an object of <code>Myclass</code> and add something to the <code>value</code> attribute.</p>
  
  <pre><code>&gt;&gt;&gt; m1 = Myclass('m1')
  &gt;&gt;&gt; m1.value.append('a')
  &gt;&gt;&gt; m1.value.append('b')
  &gt;&gt;&gt; m1.value
  ['a', 'b']
  </code></pre>
  
  <p>Now I try to delete it.</p>
  
  <pre><code>&gt;&gt;&gt; del m1
  &gt;&gt;&gt; m1.value  ### the variable seem to be properly erased
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  NameError: name 'm1' is not defined
  </code></pre>
  
  <p>Seems to be properly deleted. I try to create a new object with the same name (because I want to overwrite the old values).</p>
  
  <pre><code>&gt;&gt;&gt; m1 = Myclass('m1')
  &gt;&gt;&gt; m1.value
  ['a', 'b'] ### The previous value was not erased!!
  </code></pre>
  
  <p>It seems the <code>del</code> command on python is not actually deleting the variable. Do I need to manually call the garbage collector to erase it?</p>
  
  <p>I'm using python 3.6.3</p>