]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
imaplib: simplify example code in doc string
authorForest <forestix@nom.one>
Mon, 23 Sep 2024 21:53:59 +0000 (14:53 -0700)
committerForest <forestix@nom.one>
Mon, 23 Sep 2024 21:57:25 +0000 (14:57 -0700)
This is for consistency with the documentation change in 8077f2eab287
and subsequent correction in 013bbf18fc42.

Lib/imaplib.py

index fec352e9b8884f55da09ce2057edae9ef6889721..bbb8443121533acdf13b2bb17e4ade6d7f06749a 100644 (file)
@@ -667,8 +667,7 @@ class IMAP4:
         Example:
 
         with imap.idle(dur=29*60) as idler:
-            for response in idler:
-                typ, datum = response
+            for typ, datum in idler:
                 print(typ, datum)
 
         Responses produced by the iterator are not added to the internal