title: Make subclass have its own class attribute
body: <p>I have an class <code>Generic</code></p>
  
  <pre><code>class Generic:
      raw_data = []
      objects = dict()
  </code></pre>
  
  <p>and concrete classes </p>
  
  <pre><code>class A(Generic):
      raw_data = module.somethingA
  
  class B(Generic):
      raw_data = module.somethingB
  </code></pre>
  
  <p>I want to populate each <code>raw_data</code> onto each <code>objects</code> dict of the class.
  To that, I'm running:</p>
  
  <pre><code>for object_type in (A, B):
       for data in object_type.raw_data:
           new_object = object_type(*data)
           object_type.objects[id(new_object)] = new_object
  </code></pre>
  
  <p>However, this does not work because <code>objects</code> is shared between <code>A</code> and <code>B</code>, and I wanted each subclass of <code>Generic</code> to have their own objects.</p>
  
  <p>How do I achieve this without having to type <code>objects = dict()</code> on every subclass? </p>
  
  <p>I'm inclined to say that this is a traditional case where a meta class is required (that adds <code>objects</code> to each new class); is this the case, or is there a simpler option?</p>