[issue27158] `isinstance` function does not handle types that are their own type

Emanuel Barry report at bugs.python.org
Sun May 29 18:56:03 EDT 2016


Emanuel Barry added the comment:

Works for me:

>>> class meta(type): pass
...
>>> class X(type, metaclass=meta): pass
...
>>> X.__class__ = X
>>> type(X) is X
True
>>> isinstance(X, X)
True

----------
nosy: +ebarry
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27158>
_______________________________________


More information about the Python-bugs-list mailing list