(value, type_)
Determine if value is a subclass of type_

    Will work even if it is not a valid question to ask of
    the given value.
Determine if value is a subclass of type_
Determine if value is a subclass of type_
def isinstance_safe(value, type_):
    """Determine if value is a subclass of type_

    Will work even if it is not a valid question to ask of
    the given value.
    """
    try:
        return isinstance(value, type_)
    except TypeError:
        # Cannot perform isinstance on some types
        return False
def isinstance_safe ( value , type_ ) : try : return isinstance ( value , type_ ) except TypeError : # Cannot perform isinstance on some types return False