Skip to content

Commit c933051

Browse files
committed
Fix wrong documentation of get_header_segment() and get_footer_segment()
1 parent 3788322 commit c933051

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

pydifact/segmentcollection.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,23 @@ def add_segment(self, segment: Segment) -> "AbstractSegmentsContainer":
217217
return self
218218

219219
def get_header_segment(self) -> Optional[Segment]:
220-
"""Return the header segment or ``None`` if there is no header.
220+
"""Craft and return a header segment.
221+
222+
:meth:`get_header_segment` creates and returns an appropriate
223+
:class:`~pydifact.segments.Segment` object that can serve as a header of the
224+
current object. This is useful, for example, when serializing the current object.
225+
226+
Although the current object may have been created by reading a string (e.g.
227+
with :meth:`from_str`), :meth:`get_header_segment` does not return the header
228+
segment that was read by the string; that segment would have been useful only
229+
during reading and it is the job of :meth:`from_str` to check it.
221230
"""
222231
return None
223232

224233
def get_footer_segment(self) -> Optional[Segment]:
225-
"""Return the footer segment or ``None`` if there is no footer.
234+
"""Craft and return a footer segment.
235+
236+
This is similar to :meth:`get_header_segment`, but for the footer segment.
226237
"""
227238
return None
228239

0 commit comments

Comments
 (0)