首先说明python3中无论写不写(object),默认的会自动带上,所以在python3中写不写都一样
class Student1:
pass
class Student2(object)...', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook...', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook...__', '__weakref__']
可以看出两个的所具有相同的属性,因为继承了object
若不继承则只有__doc__ , __module__ 这两个属性,因为上边的属性,我们都要使用,所以一般是继承的