# Pastebin SizKnSqH @specialize.arg_or_var(2) def _type_isinstance(self, w_inst, w_type): if not isinstance(w_type, W_TypeObject): raise oefmt(self.w_TypeError, "need type object") if is_annotation_constant(w_type): cls = self._get_interplevel_cls(w_type) if cls is not None: assert w_inst is not None if isinstance(w_inst, cls): return True return self.type(w_inst).issubtype(w_type)