Пример #1
0
 def issubtype(obj, s_cls):
     if hasattr(obj, "is_type_of"):
         vars = obj.is_type_of
         annotator = getbookkeeper().annotator
         return builtin.builtin_isinstance(annotator.binding(vars[0]), s_cls, vars)
     if obj.is_constant() and s_cls.is_constant():
         return immutablevalue(issubclass(obj.const, s_cls.const))
     return s_Bool
Пример #2
0
 def issubtype(obj, s_cls):
     if hasattr(obj, 'is_type_of'):
         vars = obj.is_type_of
         annotator = getbookkeeper().annotator
         return builtin.builtin_isinstance(annotator.binding(vars[0]),
                                           s_cls, vars)
     if obj.is_constant() and s_cls.is_constant():
         return immutablevalue(issubclass(obj.const, s_cls.const))
     return s_Bool