]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-149930: Clarify imaplib response helper types (GH-149963) (GH-153124)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 5 Jul 2026 13:27:49 +0000 (15:27 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 13:27:49 +0000 (16:27 +0300)
(cherry picked from commit d2d415b9761a539c37ea4f950df4e9aab0eca6ed)

Co-authored-by: Savage Mechanic <savagemechanic@github.com>
Co-authored-by: savagemechanic <20458938+savagemechanic@users.noreply.github.com>
Doc/library/imaplib.rst

index 514c22c69462565f651a245e9ea370ad039c6f16..83c44f274c3c00fa452e45bcfb7aa921fcb6122b 100644 (file)
@@ -135,11 +135,11 @@ The second subclass allows for connections created by a child process:
 The following utility functions are defined:
 
 
-.. function:: Internaldate2tuple(datestr)
+.. function:: Internaldate2tuple(resp)
 
-   Parse an IMAP4 ``INTERNALDATE`` string and return corresponding local
-   time.  The return value is a :class:`time.struct_time` tuple or
-   ``None`` if the string has wrong format.
+   Parse a :term:`bytes-like object` containing an IMAP4 ``INTERNALDATE``
+   response and return the corresponding local time.  The return value is a
+   :class:`time.struct_time` tuple or ``None`` if the input has wrong format.
 
 .. function:: Int2AP(num)
 
@@ -147,9 +147,11 @@ The following utility functions are defined:
    [``A`` .. ``P``].
 
 
-.. function:: ParseFlags(flagstr)
+.. function:: ParseFlags(resp)
 
-   Converts an IMAP4 ``FLAGS`` response to a tuple of individual flags.
+   Converts a :term:`bytes-like object` containing an IMAP4 ``FLAGS`` response
+   to a tuple of individual flags as :class:`bytes`.  The return value is an
+   empty tuple if the input has wrong format.
 
 
 .. function:: Time2Internaldate(date_time)