7
7stud
Thanks.
This might be helpful is the phrase "indirect instance" had any meaningChristian said:No, type is the meta class of the class object:
True
As you can see object is not a subclass of type but an instance of type.
This may look confusing at first but it's easy to explain. Like a class
is the blue print of an instance, a meta class is the blue print of a
class. In Python everything is a direct or indirect instance of type.
Except, of course, when someobject is type, when it won't print anythingo = someobject
while o is not type:
o = type(o)
print o
The code will eventually print "type".
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.