Skip to content

Commit 59e0c6a

Browse files
author
Forest
committed
imaplib: while/yield instead of yield from iter()
1 parent 9c4af2c commit 59e0c6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/imaplib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import binascii
2727
import calendar
2828
import errno
29-
import functools
3029
import platform
3130
import random
3231
import re
@@ -1585,7 +1584,8 @@ def burst(self, interval=0.1):
15851584

15861585
start = time.monotonic()
15871586

1588-
yield from iter(functools.partial(self._pop, interval, None), None)
1587+
while response := self._pop(interval, None):
1588+
yield response
15891589

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

0 commit comments

Comments
 (0)