I am reading a textbook on Python and it covers new-style class differences. Observe the following code in Python 2.X in the interpreter, which uses classic classes:
class C: pass
X = C()
isinstance(X, object) #returns true
isinstance(C, object) #returns true
(To use new-style classes, one must explicitly derive from the object class in 2.X)
So how can an object that does not derive (as is the case in classic classes) from the object class be an instance of object? What is going on behind the scenes in the case of 3.X and 2.X?
As for whether this is a duplicate question: I already knew that everything was technically an object, I was wondering how the discrepancy is handled explicitly in the design of python itself, rather than taking the results of isinstance for granted.