def serialize(self, break_lines: bool = False) -> str: """Serialize all the segments added to this object. :param break_lines: if True, insert line break after each segment terminator. """ header = self.get_header_segment() footer = self.get_footer_segment() out = [] if header: out.append(header) out += self.segments if footer: out.append(footer) return Serializer(self.characters).serialize( out, self.has_una_segment, break_lines, )
def serialize(self): u"""Serialize all the segments added to this object.""" return Serializer().serialize(self.segments, self.has_una_segment)
def serializer(): return Serializer()
def serialize(self) -> str: """Serialize all the segments added to this object.""" return Serializer(self.characters).serialize(self.segments, self.has_una_segment)
def setUp(self): self.serializer = Serializer()
def serialize(self, break_lines=False) -> str: """Serialize all the segments added to this object.""" return Serializer().serialize(self.segments, self.has_una_segment, break_lines)
def serialize(self, break_lines: bool = False) -> str: """Serialize all the segments added to this object. :param break_lines: if True, insert line break after each segment terminator. """ return Serializer().serialize(self.segments, self.has_una_segment, break_lines)