Return the next message in a one-time iteration.
(self)
| 562 | |
| 563 | # This method is for backward compatibility only. |
| 564 | def next(self): |
| 565 | """Return the next message in a one-time iteration.""" |
| 566 | if not hasattr(self, '_onetime_keys'): |
| 567 | self._onetime_keys = self.iterkeys() |
| 568 | while True: |
| 569 | try: |
| 570 | return self[next(self._onetime_keys)] |
| 571 | except StopIteration: |
| 572 | return None |
| 573 | except KeyError: |
| 574 | continue |
| 575 | |
| 576 | |
| 577 | class _singlefileMailbox(Mailbox): |