面向对象进阶: isinstance和issubclass 反射 __setattr__,__getattr,__delattr__ __setitem__,__getitem,__delitem__ __str__,__repr__,__format__ __del__ isinstance和issubclass isinstance(obj,cls) 检查obj是否是类cls的对象 class Foo(object): pass obj = Foo() isinstance(obj, Foo…