title: setting parent class attribute using type
body: <p>What is the reason why this code doesn't work?</p>
  
  <pre><code>class Parent:
    l = []
  
    def __init__(self, val):
      print("l is: " + str(Parent.l))
  
  C = type('Child', (Parent,), {})
  C.l = [1, 2]
  
  C(1) # prints "l is []" rather than "l is [1,2]"
  </code></pre>