title: Why is "if not someobj:" better than "if someobj == None:" in Python?
body: <p>I've seen several examples of code like this:</p>
  
  <pre><code>if not someobj:
      #do something
  </code></pre>
  
  <p>But I'm wondering why not doing:</p>
  
  <pre><code>if someobj == None:
      #do something
  </code></pre>
  
  <p>Is there any difference? Does one have an advantage over the other?</p>