How can I refer to class variable in a function without referring to its class in Python?
<p>I have a following class:</p>

<pre><code>class Foo:
    CONSTANT = 1

    def some_fn(self):
        a = Foo.CONSTANT
        # do something
</code></pre>

<p>How can I refer to <code>Foo.CONSTANT</code> without referring to <code>Foo</code>, or refer to <code>Foo</code> in a generic way? (I don't want to change all references to it when renaming a class)</p>
