Skip to content

Commit d2d415b

Browse files
gh-149930: Clarify imaplib response helper types (GH-149963)
Co-authored-by: savagemechanic <20458938+savagemechanic@users.noreply.github.com>
1 parent 8f06112 commit d2d415b

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

129129

130-
.. function:: Internaldate2tuple(datestr)
130+
.. function:: Internaldate2tuple(resp)
131131

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

136136
.. function:: Int2AP(num)
137137

138138
Converts an integer into a bytes representation using characters from the set
139139
[``A`` .. ``P``].
140140

141141

142-
.. function:: ParseFlags(flagstr)
142+
.. function:: ParseFlags(resp)
143143

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

146148

147149
.. function:: Time2Internaldate(date_time)

0 commit comments

Comments
 (0)