<p>I have a python module that defines a number of classes:</p>

<pre><code>class A(object):
    def __call__(self):
        print "ran a"

class B(object):
    def __call__(self):
        print "ran b"

class C(object):
    def __call__(self):
        print "ran c"
</code></pre>

<p>From within the module, how might I add an attribute that gives me all of the classes?</p>

<p>dir() gives me the names of everything from within my module, but I can't seem to figure out how to go from the name of a class to the class itself from <em>within</em> the module.</p>

<p>From outside of the module, I can simply use <code>getattr(mod, 'A')</code>, but I don't have a <code>self</code> kind of module from within the module itself.</p>

<p>This seems pretty obvious.  Can someone tell me what I'm missing?</p>

```
```
import sys
getattr(sys.modules[__name__], 'A')
```
```