def __repr__(self): start_end_str = format_start_end(self.start, self.end) values = [start_end_str, reprlib.repr(self.text)] value_str = ', '.join('{}'.format(i) for i in values) return '{}({})'.format(self.__class__.__name__, value_str)
def __repr__(self): values = [reprlib.repr(self.text), format_start_end(self.start, self.end), "break" if self.isbreak else "cont"] value_str = ", ".join("{}".format(i) for i in values) return "{}({})".format(self.__class__.__name__, value_str)