Skip to content

Commit e8a8509

Browse files
author
Forest
committed
doc: imaplib: elaborate on IDLE response delivery
1 parent be34141 commit e8a8509

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Doc/library/imaplib.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,12 @@ An :class:`IMAP4` instance has the following methods:
317317
:keyword:`with` statement, produces IMAP untagged responses via the
318318
:term:`iterator` protocol, and sends ``DONE`` upon context exit.
319319

320+
All untagged responses that arrive after sending the ``IDLE`` command
321+
(including any that arrive before the server acknowledges the command) will
322+
be available via iteration. Any leftover responses (those not iterated in
323+
the :keyword:`with` context) can be retrieved in the usual way after
324+
``IDLE`` ends, using :meth:`IMAP4.response`.
325+
320326
Responses are represented as ``(type, [data, ...])`` tuples, as described
321327
in :ref:`IMAP4 Objects <imap4-objects>`.
322328

0 commit comments

Comments
 (0)