8000 [3.12] gh-121529: Document `from_` parameter in `_mboxMMDF` public me… · python/cpython@7d5b813 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7d5b813

Browse files
[3.12] gh-121529: Document from_ parameter in _mboxMMDF public methods (GH-121530) (#131622)
gh-121529: Document `from_` parameter in `_mboxMMDF` public methods (GH-121530) (cherry picked from commit 557d2d2) Co-authored-by: Sebb <sebbASF@users.noreply.github.com>
1 parent 63a4273 commit 7d5b813

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

Doc/library/mailbox.rst

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,27 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
482482
remarks:
483483

484484

485-
.. method:: get_file(key)
485+
.. method:: get_bytes(key, from_=False)
486+
487+
Note: This method has an extra parameter (*from_*) compared with other classes.
488+
The first line of an mbox file entry is the Unix "From " line.
489+
If *from_* is False, the first line of the file is dropped.
490+
491+
.. method:: get_file(key, from_=False)
486492

487493
Using the file after calling :meth:`~Mailbox.flush` or
488494
:meth:`~Mailbox.close` on the :class:`!mbox` instance may yield
489495
unpredictable results or raise an exception.
490496

497+
Note: This method has an extra parameter (*from_*) compared with other classes.
498+
The first line of an mbox file entry is the Unix "From " line.
499+
If *from_* is False, the first line of the file is dropped.
500+
501+
.. method:: get_string(key, from_=False)
502+
503+
Note: This method has an extra parameter (*from_*) compared with other classes.
504+
The first line of an mbox file entry is the Unix "From " line.
505+
If *from_* is False, the first line of the file is dropped.
491506

492507
.. method:: lock()
493508
unlock()
@@ -742,12 +757,22 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
742757
remarks:
743758

744759

745-
.. method:: get_file(key)
760+
.. method:: get_bytes(key, from_=False)
761+
762+
Note: This method has an extra parameter (*from_*) compared with other classes.
763+
The first line of an mbox file entry is the Unix "From " line.
764+
If *from_* is False, the first line of the file is dropped.
765+
766+
.. method:: get_file(key, from_=False)
746767

747768
Using the file after calling :meth:`~Mailbox.flush` or
748769
:meth:`~Mailbox.close` on the :class:`!MMDF` instance may yield
749770
unpredictable results or raise an exception.
750771

772+
Note: This method has an extra parameter (*from_*) compared with other classes.
773+
The first line of an mbox file entry is the Unix "From " line.
774+
If *from_* is False, the first line of the file is dropped.
775+
751776

752777
.. method:: lock()
753778
unlock()

0 commit comments

Comments
 (0)
0