]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-121529: Document `from_` parameter in `_mboxMMDF` public methods (GH-121530...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 23 Mar 2025 12:18:32 +0000 (13:18 +0100)
committerGitHub <noreply@github.com>
Sun, 23 Mar 2025 12:18:32 +0000 (12:18 +0000)
gh-121529: Document `from_` parameter in `_mboxMMDF` public methods (GH-121530)
(cherry picked from commit 557d2d20d484a7b22da39cdb876f6312ab66d561)

Co-authored-by: Sebb <sebbASF@users.noreply.github.com>
Doc/library/mailbox.rst

index 6eb8dec44eb34aae87c99483628ca1b303445726..2c1c4b659faca2e3794b5c801eed967729cf8564 100644 (file)
@@ -482,12 +482,27 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
    remarks:
 
 
-   .. method:: get_file(key)
+   .. method:: get_bytes(key, from_=False)
+
+      Note: This method has an extra parameter (*from_*) compared with other classes.
+      The first line of an mbox file entry is the Unix "From " line.
+      If *from_* is False, the first line of the file is dropped.
+
+   .. method:: get_file(key, from_=False)
 
       Using the file after calling :meth:`~Mailbox.flush` or
       :meth:`~Mailbox.close` on the :class:`!mbox` instance may yield
       unpredictable results or raise an exception.
 
+      Note: This method has an extra parameter (*from_*) compared with other classes.
+      The first line of an mbox file entry is the Unix "From " line.
+      If *from_* is False, the first line of the file is dropped.
+
+   .. method:: get_string(key, from_=False)
+
+      Note: This method has an extra parameter (*from_*) compared with other classes.
+      The first line of an mbox file entry is the Unix "From " line.
+      If *from_* is False, the first line of the file is dropped.
 
    .. method:: lock()
                unlock()
@@ -742,12 +757,22 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
    remarks:
 
 
-   .. method:: get_file(key)
+   .. method:: get_bytes(key, from_=False)
+
+      Note: This method has an extra parameter (*from_*) compared with other classes.
+      The first line of an mbox file entry is the Unix "From " line.
+      If *from_* is False, the first line of the file is dropped.
+
+   .. method:: get_file(key, from_=False)
 
       Using the file after calling :meth:`~Mailbox.flush` or
       :meth:`~Mailbox.close` on the :class:`!MMDF` instance may yield
       unpredictable results or raise an exception.
 
+      Note: This method has an extra parameter (*from_*) compared with other classes.
+      The first line of an mbox file entry is the Unix "From " line.
+      If *from_* is False, the first line of the file is dropped.
+
 
    .. method:: lock()
                unlock()