title: Return False with a class in some defined cases
body: <p>I would like to know if there is a way to configure a class that return False in some specific cases. What makes empty strings and empty lists return False ? How to reproduce that pattern with my own conditions (for example, return False when an attribute of that class equal a defined value) ?</p>
  
  <p>An example to illustrate what I'm looking for :</p>
  
  <pre><code>class Foo():
    def__init__(self, value):
      self.value=value
  
  # I would like that the class Foo return False if his value equal 0.
  
  a = Foo(1)
  b = Foo(0)
  
  for each in [a,b]:
    if each : print( "The value isn't 0 :)" )
    else : print( "The value is 0..." )
  </code></pre>