Return the next message in a one-time iteration.
(self)
| 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 | |
| 636 | class _singlefileMailbox(Mailbox): |