为什么type(Foo)
与type(Bar)
不同,type(foo)
与type(bar)
不同?
>>> class Foo: pass
...
>>> foo = Foo()
>>> class Bar(object): pass
...
>>> bar = Bar()
>>>
>>> type(Foo)
<type 'classobj'>
>>> type(foo)
<type 'instance'>
>>> type(Bar)
<type 'type'>
>>> type(bar)
<class '__main__.Bar'>