title: Setting a class attribute with a given name in python while defining the class
body: <p>I am trying to do something like this:</p>
  
  <pre><code>property = 'name'
  value = Thing()
  class A:
    setattr(A, property, value)
    other_thing = 'normal attribute'
  
    def __init__(self, etc)
      #etc..........
  </code></pre>
  
  <p>But I can't seem to find the reference to the class to get the <code>setattr</code> to work the same as just assigning a variable in the class definition.  How can I do this?</p>