Skip to content

Commit 5fd2493

Browse files
[3.13] gh-149930: Clarify imaplib response helper types (GH-149963) (GH-153125)
(cherry picked from commit d2d415b) Co-authored-by: Savage Mechanic <savagemechanic@github.com> Co-authored-by: savagemechanic <20458938+savagemechanic@users.noreply.github.com>
1 parent 6bc32e2 commit 5fd2493

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

Doc/library/imaplib.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,21 +134,23 @@ The second subclass allows for connections created by a child process:
134134
The following utility functions are defined:
135135

136136

137-
.. function:: Internaldate2tuple(datestr)
137+
.. function:: Internaldate2tuple(resp)
138138

139-
Parse an IMAP4 ``INTERNALDATE`` string and return corresponding local
140-
time. The return value is a :class:`time.struct_time` tuple or
141-
``None`` if the string has wrong format.
139+
Parse a :term:`bytes-like object` containing an IMAP4 ``INTERNALDATE``
140+
response and return the corresponding local time. The return value is a
141+
:class:`time.struct_time` tuple or ``None`` if the input has wrong format.
142142

143143
.. function:: Int2AP(num)
144144

145145
Converts an integer into a bytes representation using characters from the set
146146
[``A`` .. ``P``].
147147

148148

149-
.. function:: ParseFlags(flagstr)
149+
.. function:: ParseFlags(resp)
150150

151-
Converts an IMAP4 ``FLAGS`` response to a tuple of individual flags.
151+
Converts a :term:`bytes-like object` containing an IMAP4 ``FLAGS`` response
152+
to a tuple of individual flags as :class:`bytes`. The return value is an
153+
empty tuple if the input has wrong format.
152154

153155

154156
.. function:: Time2Internaldate(date_time)

0 commit comments

Comments
 (0)