Python object instance inheriting changes to parent class by another instance
<p>I am confused by this behaviour of Python(2.6.5), can someone shed light on why this happens?</p>

<pre><code>class A(): 
    mylist=[]  


class B(A):
    j=0
    def addToList(self):
        self.mylist.append(1)


b1 = B()
print len(b1.mylist)  # prints 0 , as A.mylist is empty
b1.addToList()
print len(b1.mylist)  # prints 1 , as we have added to A.mylist via addToList()

b2 = B()
print len(b2.mylist)  # prints 1 !!! Why ?????
</code></pre>
