Why does defining a class in Python 2.7, without inheriting an object, not result in a __mro__ method?
__mro__
is only defined for new-style classes. In Python 2, a class is only new-style if it inherits from object
(or from a built in type, which in turn inherits from object
), while all classes in Python 3 are new-style no matter what.