7stud wrote: > On Feb 3, 10:28 pm, 7stud <[EMAIL PROTECTED]> wrote: >> From the docs: >> >> issubclass(class, classinfo) >> Return true if class is a subclass (direct or indirect) of classinfo. > > print issubclass(Dog, object) #True > print issubclass(type, object) #True > print issubclass(Dog, type) #False
And if you want to really blow your mind, print isinstance(type, object) # True print isinstance(object, type) # True -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- http://mail.python.org/mailman/listinfo/python-list