Skip to content

Commit f7a030d

Browse files
savagemechanicmiss-islington
authored andcommitted
gh-149930: Clarify imaplib response helper types (GH-149963)
(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 a624878 commit f7a030d

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
@@ -135,21 +135,23 @@ The second subclass allows for connections created by a child process:
135135
The following utility functions are defined:
136136

137137

138-
.. function:: Internaldate2tuple(datestr)
138+
.. function:: Internaldate2tuple(resp)
139139

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

144144
.. function:: Int2AP(num)
145145

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

149149

150-
.. function:: ParseFlags(flagstr)
150+
.. function:: ParseFlags(resp)
151151

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

154156

155157
.. function:: Time2Internaldate(date_time)

0 commit comments

Comments
 (0)