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

Method next

Lib/mailbox.py:623–633  ·  view source on GitHub ↗

Return the next message in a one-time iteration.

(self)

Source from the content-addressed store, hash-verified

621
622 # This method is for backward compatibility only.
623 def next(self):
624 """Return the next message in a one-time iteration."""
625 if not hasattr(self, '_onetime_keys'):
626 self._onetime_keys = self.iterkeys()
627 while True:
628 try:
629 return self[next(self._onetime_keys)]
630 except StopIteration:
631 return None
632 except KeyError:
633 continue
634
635
636class _singlefileMailbox(Mailbox):

Callers

nothing calls this directly

Calls 1

iterkeysMethod · 0.95

Tested by

no test coverage detected