tips

>>> str='hello'
>>> print str
hello
>>> del str
>>> print str

>>> type(str)

>>> print int

>>> type(int)

>>> class A(object):
...  pass
... 
>>> class B(A):
...  pass
... 
>>> isinstance(B(),A)
True
>>> type(A())==A
True
>>> type(A())

>>> A

>>> type(B())==A
False

你可能感兴趣的:(tips)