首先说明python3中无论写不写(object),默认的会自动带上,所以在python3中写不写都一样
class Student1:
pass
class Student2(object)..._gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new..._gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new...subclasshook__', '__weakref__']
可以看出两个的所具有相同的属性,因为继承了object
若不继承则只有__doc__ , __module__ 这两个属性,因为上边的属性,我们都要使用