7stud a écrit : > print dir(type) #__mro__ attribute is in here > print dir(object) #no __mro__ attribute > > > class Mammals(object): > pass > class Dog(Mammals): > pass > > print issubclass(Dog, type) #False > print Dog.__mro__ > > --output:-- > (<class '__main__.Dog'>, <class '__main__.Mammals'>, <type 'object'>) > > > The output suggests that Dog actually is a subclass of type
Nope. It suggests that Dog is a subclass of object (which is not really surprising). -- http://mail.python.org/mailman/listinfo/python-list