title: Python decorator to add class-level variables
body: <p>I have 2 classes A and B:</p>
  
  <pre><code>class A(object):
      x = 0
  
  class B(object):
      y = 0
  </code></pre>
  
  <p>How can I make it so <strong>B</strong> "inherits" <strong>A</strong>'s class-level variables (<strong>x</strong> in this case) by using decorators? Is it at all possible? The desired behavior (if possible), after decorated, <strong>B</strong> would look like this:</p>
  
  <pre><code>class B(object):
      x = 0
      y = 0
  </code></pre>
  
  <hr>
  
  <p>Note: If anyone wants/needs to know why I'm asking this, it's simply to make SQLAlchemy's Concrete Table Inheritance look nicer in code, although I can see many use cases for such behavior.</p>