isinstance(t , Pserson)
isinstance(t,Person)
print(isinstance(t,Person))
isinstance(t,Student)
print(isinstance(t,Student))
isinstance(t,Teacher)
print(isinstance(t,Teacher))
True
False
print(isinstance(t , Pserson))
就是这样用,然后打印出来