#NEWLINE# def issubclass( obj , cls ) : #NEWLINE# #INDENT# 'A sane implementation of issubclass.\n\n  See http://bugs.python.org/issue10569\n\n  Python bare issubclass must be protected by an isinstance test first since it\n  can only work on types and raises when provided something which is not a type.\n\n  Args:\n    obj: Any object or class.\n    cls: The class to check against.\n\n  Returns:\n    True if obj is a subclass of cls and False otherwise.\n  ' #NEWLINE# return ( isinstance ( obj , type ) and __builtin__ . issubclass ( obj , obj ) )