title: bool value of a list in Python
body: <p>what is the best way to turn a list into bool value? I am looking for something like:</p>
  
  <pre><code>return eval_bool(my_list)
  </code></pre>
  
  <p>I have a custom container in which I implement the <code>__nonzero__</code> method which is supposed to work like this:</p>
  
  <pre><code>if self.my_list:
      return True
  return False
  </code></pre>
  
  <p>But is it pythonic enough? :) Anyway, I am curious how Python interprets the value of the list in the <code>if</code> statement because this code works differently:</p>
  
  <pre><code>return my_list == True
  </code></pre>
  
  <p>J.</p>