]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-101760: Improve the imaplib.IMAP4 example (#101764)
authorLilKS <1244886+LilKS@users.noreply.github.com>
Sun, 24 Mar 2024 10:01:07 +0000 (11:01 +0100)
committerGitHub <noreply@github.com>
Sun, 24 Mar 2024 10:01:07 +0000 (04:01 -0600)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Doc/library/imaplib.rst

index d5c868def3b64f78fd5b32138000a120d28ff8fe..ccfd0cd3dde1091c0b7ba92f5e022dfbba9d8e6b 100644 (file)
@@ -622,7 +622,7 @@ retrieves and prints all messages::
 
    import getpass, imaplib
 
-   M = imaplib.IMAP4()
+   M = imaplib.IMAP4(host='example.org')
    M.login(getpass.getuser(), getpass.getpass())
    M.select()
    typ, data = M.search(None, 'ALL')