# Pastebin OMxqt9jW @specialize.arg_or_var(1) def newtext(self, s, lgt=-1, unused=-1): # the unused argument can be from something like # newtext(*decode_utf8sp(space, code)) if isinstance(s, unicode): s, lgt = s.encode('utf8'), len(s) else: if is_annotation_constant(s) and is_annotation_constant(lgt): return self._newtext_memo(s, lgt) assert isinstance(s, str) if lgt < 0: lgt = rutf8.codepoints_in_utf8(s) return W_UnicodeObject(s, lgt)