type, object hierarchy?

Hrvoje Niksic hniksic at xemacs.org
Mon Feb 4 02:49:53 EST 2008


7stud <bbxx789_05ss at yahoo.com> writes:

> --output:--
> (<class '__main__.Dog'>, <class '__main__.Mammals'>, <type 'object'>)
>
> The output suggests that Dog actually is a subclass of type--despite
> the fact that issubclass(Dog, type) returns False.

What was it in the output that gave you the impression that Dog is a
subclass of type?  The last entry is only for the "object" type, which
you already knew Dog was a subclass of.

>>> object
<type 'object'>
>>> type
<type 'type'>



More information about the Python-list mailing list