Are there any built-in Python classes that are not instances of type metaclass?
>>> type(list)
<type 'type'>
>>> type(dict)
<type 'type'>
>>> type(some_builtin_python_class)
<type 'some_type_other_than_type'>
Depends what you mean by "built-in". If you mean any of the C-implemented (in CPython) classes exposed as builtins (and in builtin), then no, none of them have a different metaclass.*
But there are definitely classes in the stdlib that do. For example:
>>> type(collections.abc.Iterable)
abc.ABCMeta
To clarify: Other metaclasses are of course subclasses of type, so, by the normal inheritance rules, it's still true that isinstance(Iterable, type)—but it's not true that type(Iterable) == type. Which is what you were asking for in your question—a type for which type(T) returns <type 'some_type_other_than_type'>.
* Not in 3.x, at any rate. Things were different in 2.x, where there were classic classes, and, once upon a time, "fake classes" that were actually functions that looked like type instances but weren't, and returned instances of a hidden type instance when called.
builtin module in python. Anyway, you are right, there are no such classes in this module. I've just checked itinspect because I wanted to run it against 2.4, but then I couldn't find my working 2.4 installation, so it was all a waste… :)isinstance(collections.abc.Iterable, type) is True.type, so classes with custom metaclasses are instances of type. But that's just normal inheritance; I assume he meant type(x) == type, not instance(x, type).type(Iterable).__mro__ yields (abc.ABCMeta, type, object)