Does python has methods similar to __setattr__ but for python class?
<p>Currently <strong>__setattr__</strong> only works for instance. Is there any similar method for class? I am asking this question because I want to collect the list of defined attribute in order when user define it in class as below:</p>

<pre><code>class CfgObj(object):
    _fields = []
    def __setattr__(self, name, value):
        self._fields.append([name, value])
        object.__setattr__(self, name, value)

class ACfg(CfgObj):
    setting1 = Field(str, default='set1', desc='setting1 ...')
    setting2 = Field(int, default=5, desc='setting2...')
</code></pre>

<p>I know the above code will not work as expected because the <strong>__setattr__</strong> only called by instance as below:</p>

<pre><code>acfg = ACfg()
acfg.c = 1
acfg._fields == [['c', 1]]
</code></pre>

<p>So, is there any equivalent <strong>__setattr__</strong> for python class? The main purpose is to collect the define attribute in order when user define it in class.</p>
