Return the next message in a one-time iteration.
(self)
| 614 | |
| 615 | # This method is for backward compatibility only. |
| 616 | def next(self): |
| 617 | """Return the next message in a one-time iteration.""" |
| 618 | if not hasattr(self, '_onetime_keys'): |
| 619 | self._onetime_keys = self.iterkeys() |
| 620 | while True: |
| 621 | try: |
| 622 | return self[next(self._onetime_keys)] |
| 623 | except StopIteration: |
| 624 | return None |
| 625 | except KeyError: |
| 626 | continue |
| 627 | |
| 628 | |
| 629 | class _singlefileMailbox(Mailbox): |