title: Strange Python class behavior
body: <p>I have created a simple class to manage tree of related objects:</p>
  
  <pre><code>class node(object):
      children = list([])
  
      def __init__(self, ID, *children):
          self.ID = ID
          for c in children:
              self.children.append(c)
  
      def add(self, *children ):
          for c in children:
              self.children.append(c)
  
      def __str__(self):
          return self.ID
      def __repr__(self):
          print self.ID, len(self.children)
  
  
  root = node('1')
  root.add( node('1.1', node('1.1.1')),
            node('1.2'))
  
  for c in root.children:
      print c
  </code></pre>
  
  <p>I'm getting:</p>
  
  <pre><code>1.1.1
  1.1
  1.2
  </code></pre>
  
  <p>However I'm expecting just 1.1 and 1.2. What is my mistake?</p>
  
  <p>thanks,
  Dmitry</p>