Python new-style classes and __subclasses__ function
<p>Can somebody explain to me why this works (in Python 2.5) :</p>

<pre><code>class Foo(object):
    pass

class Bar(Foo):
    pass

print(Foo.__subclasses__())
</code></pre>

<p>but this doesn't :</p>

<pre><code>class Foo():
    pass

class Bar(Foo):
    pass

print(Foo.__subclasses__())
</code></pre>

<p>The latter returns "AttributeError: class Foo has no attribute '<code>__subclasses__</code>'" but i'm not sure why. I know this is related to old-style vs. new-style classes but i'm not clear on why that would make this functionality unavailable. </p>

<p><strong>Clarification:</strong> I'm looking to understand WHY <code>__subclasses__()</code> isn't available in old-style, i get that the method doesn't exist for old-style classes but I don't get what it is about new-style that makes these new functions possible.</p>
