def __mod__(self, arg): if isinstance(arg, tuple): arg = tuple(imap(_MarkupEscapeHelper, arg, self.escape)) else: arg = _MarkupEscapeHelper(arg, self.escape) return self.__class__(text_type.__mod__(self, arg))
def join(self, seq): return self.__class__(text_type.join(self, imap(self.escape, seq)))