MCPcopy Index your code
hub / github.com/python/cpython / recent

Method recent

Lib/imaplib.py:446–460  ·  view source on GitHub ↗

Return most recent 'RECENT' responses if any exist, else prompt server for an update using the 'NOOP' command. (typ, [data]) = .recent() 'data' is None if no new messages, else list of RECENT responses, most recent last.

(self)

Source from the content-addressed store, hash-verified

444
445
446 def recent(self):
447 """Return most recent 'RECENT' responses if any exist,
448 else prompt server for an update using the 'NOOP' command.
449
450 (typ, [data]) = <instance>.recent()
451
452 'data' is None if no new messages,
453 else list of RECENT responses, most recent last.
454 """
455 name = 'RECENT'
456 typ, dat = self._untagged_response('OK', [None], name)
457 if dat[-1]:
458 return typ, dat
459 typ, dat = self.noop() # Prod server for response
460 return self._untagged_response(typ, dat, name)
461
462
463 def response(self, code):

Callers

nothing calls this directly

Calls 2

_untagged_responseMethod · 0.95
noopMethod · 0.95

Tested by

no test coverage detected