]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149930: Clarify imaplib response helper types (GH-149963)
authorSavage Mechanic <savagemechanic@github.com>
Sun, 5 Jul 2026 13:16:54 +0000 (14:16 +0100)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 13:16:54 +0000 (13:16 +0000)
Co-authored-by: savagemechanic <20458938+savagemechanic@users.noreply.github.com>
Doc/library/imaplib.rst

index dbf4560ab5e53b3f5e150350570943dc7cd622c6..c58c957d03c1d8484f0cec342b77da0cfa2d64af 100644 (file)
@@ -127,11 +127,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)
 
@@ -139,9 +139,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)