title: Which is better in python, del or delattr?
body: <p>This may be silly, but it's been nagging the back of my brain for a while. </p>
  
  <p>Python gives us two built-in ways to delete attributes from objects, the <strong>del</strong> command word and the <strong>delattr</strong> built-in function. I prefer <strong>delattr</strong> because it I think its a bit more explicit:</p>
  
  <pre><code>del foo.bar
  delattr(foo, "bar")
  </code></pre>
  
  <p>But I'm wondering if there might be under-the-hood differences between them.</p>