(cls, instance)
return (cls.__subclasscheck__(subclass) or
                cls.__subclasscheck__(subtype))
Override for isinstance(instance, cls).
Override for isinstance(instance, cls).
Override for isinstance ( instance cls ) .
def __instancecheck__(cls, instance):
        """Override for isinstance(instance, cls)."""
        # Inline the cache checking when it's simple.
        subclass = getattr(instance, '__class__', None)
        if subclass is not None and subclass in cls._abc_cache:
            return True
        subtype = type(instance)
        # Old-style instances
        if subtype is _InstanceType:
            subtype = subclass
        if subtype is subclass or subclass is None:
            if (cls._abc_negative_cache_version ==
                ABCMeta._abc_invalidation_counter and
                subtype in cls._abc_negative_cache):
                return False
            # Fall back to the subclass check.
            return cls.__subclasscheck__(subtype)
        return (cls.__subclasscheck__(subclass) or
                cls.__subclasscheck__(subtype))
def __instancecheck__ ( cls , instance ) : # Inline the cache checking when it's simple. subclass = getattr ( instance , '__class__' , None ) if subclass is not None and subclass in cls . _abc_cache : return True subtype = type ( instance ) # Old-style instances if subtype is _InstanceType : subtype = subclass if subtype is subclass or subclass is None : if ( cls . _abc_negative_cache_version == ABCMeta . _abc_invalidation_counter and subtype in cls . _abc_negative_cache ) : return False # Fall back to the subclass check. return cls . __subclasscheck__ ( subtype ) return ( cls . __subclasscheck__ ( subclass ) or cls . __subclasscheck__ ( subtype ) )