]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-101760: Improve the imaplib.IMAP4 example (GH-101764) (#117192)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 24 Mar 2024 10:07:37 +0000 (11:07 +0100)
committerGitHub <noreply@github.com>
Sun, 24 Mar 2024 10:07:37 +0000 (10:07 +0000)
Co-authored-by: LilKS <1244886+LilKS@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Doc/library/imaplib.rst

index 594c6b1a3803a83efbe2fb2569e745d5064e45f6..6059a140861b8cd16bf4021944b4bcb17a5ba24f 100644 (file)
@@ -632,7 +632,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')