Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 557d2d2

Browse files
authoredMar 23, 2025
gh-121529: Document from_ parameter in _mboxMMDF public methods (#121530)
1 parent a9a399f commit 557d2d2

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed
 

‎Doc/library/mailbox.rst

+27-2
Original file line numberDiff line numberDiff line change
@@ -587,12 +587,27 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
587587
remarks:
588588

589589

590-
.. method:: get_file(key)
590+
.. method:: get_bytes(key, from_=False)
591+
592+
Note: This method has an extra parameter (*from_*) compared with other classes.
593+
The first line of an mbox file entry is the Unix "From " line.
594+
If *from_* is False, the first line of the file is dropped.
595+
596+
.. method:: get_file(key, from_=False)
591597

592598
Using the file after calling :meth:`~Mailbox.flush` or
593599
:meth:`~Mailbox.close` on the :class:`!mbox` instance may yield
594600
unpredictable results or raise an exception.
595601

602+
Note: This method has an extra parameter (*from_*) compared with other classes.
603+
The first line of an mbox file entry is the Unix "From " line.
604+
If *from_* is False, the first line of the file is dropped.
605+
606+
.. method:: get_string(key, from_=False)
607+
608+
Note: This method has an extra parameter (*from_*) compared with other classes.
609+
The first line of an mbox file entry is the Unix "From " line.
610+
If *from_* is False, the first line of the file is dropped.
596611

597612
.. method:: lock()
598613
unlock()
@@ -851,12 +866,22 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
851866
remarks:
852867

853868

854-
.. method:: get_file(key)
869+
.. method:: get_bytes(key, from_=False)
870+
871+
Note: This method has an extra parameter (*from_*) compared with other classes.
872+
The first line of an mbox file entry is the Unix "From " line.
873+
If *from_* is False, the first line of the file is dropped.
874+
875+
.. method:: get_file(key, from_=False)
855876

856877
Using the file after calling :meth:`~Mailbox.flush` or
857878
:meth:`~Mailbox.close` on the :class:`!MMDF` instance may yield
858879
unpredictable results or raise an exception.
859880

881+
Note: This method has an extra parameter (*from_*) compared with other classes.
882+
The first line of an mbox file entry is the Unix "From " line.
883+
If *from_* is False, the first line of the file is dropped.
884+
860885

861886
.. method:: lock()
862887
unlock()

0 commit comments

Comments
 (0)
Failed to load comments.