]> granicus.if.org Git - python/commitdiff
Correct the poplib example. Stephan Richter pointed out some problems
authorGuido van Rossum <guido@python.org>
Tue, 8 Dec 1998 16:30:10 +0000 (16:30 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 8 Dec 1998 16:30:10 +0000 (16:30 +0000)
with it.

Doc/lib/libpoplib.tex

index e3ec5e15aac8287becb3f702fedf8df2b4743116..6485a77f21d025de766c099477693e3699b2dc0f 100644 (file)
@@ -119,15 +119,15 @@ Here is a minimal example (without error checking) that opens a
 mailbox and retrieves and prints all messages:
 
 \begin{verbatim}
-import getpass, poplib, string
+import getpass, poplib
 
 M = poplib.POP3('localhost')
 M.user(getpass.getuser())
-M.pass(getpass.getpass())
+M.pass_(getpass.getpass())
 numMessages = len(M.list()[1])
 for i in range(numMessages):
     for j in M.retr(i+1)[1]:
-        sys.stdout.write(j)
+        print j
 \end{verbatim}
 
 At the end of the module, there is a test section that contains a more