Ejemplo n.º 1
0
 def __instancecheck__(cls, instance):
     if _has_concrete_method(cls, "__instancecheck__"):
         return cls.__instancecheck__(instance)
     else:
         # If __instancheck__ NOT redefined
         #   OR if it is redefined, but as an abstractmethod
         return ABCMeta.__instancecheck__(cls, instance)
Ejemplo n.º 2
0
 def __instancecheck__(self, instance):
     '''
     @see: ABCMeta.__instancecheck__
     '''
     if ABCMeta.__instancecheck__(self, instance): return True
     if self is not MappedSupport: return False
     return isinstance(getattr(instance, '__mapper__', None), Mapper)
Ejemplo n.º 3
0
 def __instancecheck__(self, instance):
     '''
     @see: ABCMeta.__instancecheck__
     '''
     if ABCMeta.__instancecheck__(self, instance): return True
     if self is not TypeSupport: return False
     return isinstance(getattr(instance, '_ally_type', None), Type)
Ejemplo n.º 4
0
 def __instancecheck__(self, instance):
     '''
     @see: ABCMeta.__instancecheck__
     '''
     if ABCMeta.__instancecheck__(self, instance): return True
     if self is not MappedSupport: return False
     return isinstance(getattr(instance, '__mapper__', None), Mapper)