Skip to content

Commit

Permalink
imaplib: while/yield instead of yield from iter()
Browse files Browse the repository at this point in the history
  • Loading branch information
foresto committed Dec 8, 2024
1 parent 9c4af2c commit 59e0c6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/imaplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import binascii
import calendar
import errno
import functools
import platform
import random
import re
Expand Down Expand Up @@ -1585,7 +1584,8 @@ def burst(self, interval=0.1):

start = time.monotonic()

yield from iter(functools.partial(self._pop, interval, None), None)
while response := self._pop(interval, None):
yield response

if self._duration is not None:
elapsed = time.monotonic() - start
Expand Down

0 comments on commit 59e0c6a

Please sign in to comment.