class method __instancecheck__ does not work
<p>I am using python 2.7.3 on Windows. I tried to override the <code>__instancecheck__</code> magic method as a class method. But I can not make it work.</p>

<pre><code>class Enumeration(int):
    @classmethod
    def __instancecheck__(cls, inst):
        if type(inst) == cls:
            return True
        if isinstance(inst, int) and inst in range(0,10):
            return True
        return False

print isinstance(1, Enumeration)   # prints False
print isinstance(1, Enumeration()) # prints True
</code></pre>

<p>I assume the first print statement would get True. But it seems the magic method <code>__instancecheck__</code> is not called. And I don't know why the second print statement can work since the <code>isinstance</code> should take a class/type as the second parameter.</p>

<p>Does anyone know what the problem is? Thanks.</p>
