title: Python remove empty and null keys doesn't effect my object
body: <p>I'm trying to remove null and empty keys from my python object by calling a method from a module.</p>
  
  <pre><code>from file2 import remove_nulls
  # initialize object and set attributes
  obj.remove_nulls()
  </code></pre>
  
  <p>In my <code>remove_nulls()</code> method, if I print the resultant object, I can observe that null and empty keys are removed, but after returning from the function, the final object still has the null and empty keys.</p>
  
  <pre><code>def remove_null(feature):
      return json.dumps(del_none(feature.__dict__.copy()))
  
  def del_none(d):
    for key, value in list(d.items()):
      if value is None:
          del d[key]
      elif isinstance(value, dict):
          del_none(value)
    return d 
  </code></pre>
  
  <p>Can someone help to fine where it went wrong?</p>