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
Python 2.5.1 (r251:54863, Oct  5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> issubclass (object, type)
False
 >>> isinstance (object, type)
True

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to