Why 'issubclass(object, Type)' Gives False (in Python)?
I'm confused in python class hierarchy. I want to know the relation between type and object. object is the top of 'issubclass()' function. type is the top of 'thing.class' and 'typ
Solution 1:
In Python, everything is an object, so:
isinstance(type, object) == True
Since object
is a type constructor, it's a subclass of type
:
isinstance(object, type) == True
Post a Comment for "Why 'issubclass(object, Type)' Gives False (in Python)?"