title: python class act like a list
body: <p>Why the following code returns empty after I have added several items in it?</p>
  
  <pre><code>class Con(list):
  
      def __init__(self): pass
  
      def __str__(self):
          return ' '.join(self)
  
      def add(self, value)
          self.append(value)
  
  i for i in range(10):
      Con().add(i)
  
  &gt;&gt;&gt; print Con()
  # empty space instead of:
  0 1 2 3 4 5 6 7 8 9 
  </code></pre>
  
  <p>What else I have to define for my class to act like a list?</p>