Can python tell me which attributes of a class were defined in the current block?
<p>For instance, the class declaration:</p>

<pre><code>class Something(Superclass):
    an_attribute = 1
    another_attribute = 'hello'
</code></pre>

<p>Is there any way that python can tell me that <code>an_attribute</code> and <code>another_attribute</code> were defined in this class declaration?</p>

<p>Another way of framing this question, I guess, is "can I filter <code>dir</code> results by the class in which they were declared?</p>
