]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-101760: Improve the imaplib.IMAP4 example (GH-101764) (#117191)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 24 Mar 2024 10:09:08 +0000 (11:09 +0100)
committerGitHub <noreply@github.com>
Sun, 24 Mar 2024 10:09:08 +0000 (10:09 +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 1f774e64b0eae33e77b4253703ecb5735199ecba..b16275fc148a53b716b41cd32f4d38d15fb468d1 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')