Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce227e3

Browse files
committed
Clarify the status of get_string() and recommend using the binary API.
1 parent d163c2c commit ce227e3

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Doc/whatsnew/3.2.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,8 +2169,13 @@ the file to text-mode). There is also a new :meth:`~mailbox.Mailbox.get_bytes`
21692169
method that returns a :class:`bytes` representation of a message corresponding
21702170
to a given *key*.
21712171

2172-
(Contributed by R. David Murray with efforts from Steffen Daode Nurpmeso and
2173-
Victor Stinner in :issue:`9124`.)
2172+
It is still possible to get non-binary output using the old API's
2173+
:meth:`~mailbox.Mailbox.get_string` method, but that approach
2174+
is not very useful. Instead, it is best to extract messages from
2175+
a :class:`~mailbox.Message` object or to load them from binary input.
2176+
2177+
(Contributed by R. David Murray, with efforts from Steffen Daode Nurpmeso and an
2178+
initial patch by Victor Stinner in :issue:`9124`.)
21742179

21752180
turtledemo
21762181
----------

0 commit comments

Comments
 (0)