R. David Murray <rdmur...@bitdance.com> added the comment: You are correct, B is not an instance of A. But both B and A are instances of 'type':
>>> class A: ... pass ... >>> class B(A): ... pass ... >>> isinstance(A, type) True >>> isinstance(B, type) True >>> And type is a subclass of object. isinstance is correct, because Python is consistent. As we said, *everything* is an object. If you want to know if something is a class, you can check isinstance(X, type): >>> a = A() >>> isinstance(a, type) False ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12203> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com