title: Python and object/class attrs - what's going on?
body: <p>Can someone explain why Python does the following?</p>
  
  <pre><code>&gt;&gt;&gt; class Foo(object):
  ...   bar = []
  ...
  &gt;&gt;&gt; a = Foo()
  &gt;&gt;&gt; b = Foo()
  &gt;&gt;&gt; a.bar.append(1)
  &gt;&gt;&gt; b.bar
  [1]
  &gt;&gt;&gt; a.bar = 1
  &gt;&gt;&gt; a.bar
  1
  &gt;&gt;&gt; b.bar
  [1]
  &gt;&gt;&gt; a.bar = []
  &gt;&gt;&gt; a.bar
  []
  &gt;&gt;&gt; b.bar
  [1]
  &gt;&gt;&gt; del a.bar
  &gt;&gt;&gt; a.bar
  [1]
  </code></pre>
  
  <p>It's rather confusing!</p>