def is_subclass(obj, cls):
    """
    判断某一个类或者对象是否是某一个类的子类
    :param obj: 类或对象
    :param cls: 类
    :return: True or False
    """
    try:
        for i in obj.__bases__:
            if i is cls or isinstance(i, cls):
                return True
        for i in obj.__bases__:
            if isinstance(i, cls):
                return True
    except AttributeError:
        return isinstance(obj.__class__, cls)
    return False
