1 # type生成了所有的对象,包含object,list,类.....
2 # type生成了int,int生成了1
3 a = 1
4 print(type(a)) # >>
5 print(type(int)) # >>
6 print(type(object)) # >> object由type生成
7
8 # type生成了str,str生成了'abc'
9 b = 'abc'
10 print(type(b)) # >>
11 print(type(str)) # >>
12
13 # object是最顶层的基类
14 print(object.__base__) # >>> None
15
16 # type是一个类,同时type也是一个对象,type的基类是object
17 print(type.__base__) # >>
18
19
20 class Person(object):
21 pass
22
23 print(type(Person)) # >>
24 print(Person.__base__) # >>
25 print(type(type)) #>>