Python get subclass name
<p>Is it possible to get the name of a subclass?  For example:</p>

<pre><code>class Foo:
    def bar(self):
        print type(self)

class SubFoo(Foo):
    pass

SubFoo().bar()
</code></pre>

<p>will print: &lt; type 'instance' ></p>

<p>I'm looking for a way to get "SubFoo".</p>

<p>I know you can do <code>isinstance</code>, but I don't know the name of the class a priori, so that doesn't work for me.</p>
