]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
docs: correct mistake in imaplib example
authorForest <forestix@nom.one>
Sun, 22 Sep 2024 23:47:22 +0000 (16:47 -0700)
committerForest <forestix@nom.one>
Sun, 22 Sep 2024 23:52:14 +0000 (16:52 -0700)
This is a correction to 8077f2eab287703b77350f1bfc9db2bd236dd9a7, which
changed a variable name in only one place and broke the subsequent
reference to it, departed from the naming convention used in the rest of
the module, and shadowed the type() builtin along the way.

Doc/library/imaplib.rst

index 6731c60228a04b7139511bafd06420911e9ba7c1..757cd715704a0409db8ca91dc4fdd2ddf3c7e9b0 100644 (file)
@@ -334,7 +334,7 @@ An :class:`IMAP4` instance has the following methods:
    Example::
 
       with M.idle(dur=29 * 60) as idler:
-          for type, datum in idler:
+          for typ, datum in idler:
               print(typ, datum)
 
       ('EXISTS', b'1')