diff Doc/tutorial/stdlib.rst @ 48355:1dbd7a522a23

Review the doc changes for the urllib package creation.
author Georg Brandl <georg@python.org>
date Mon, 23 Jun 2008 11:23:31 +0000
parents 1f671c85df04
children 93cf3a6ead63 5235dcda9076
line wrap: on
line diff
--- a/Doc/tutorial/stdlib.rst	Mon Jun 23 04:41:59 2008 +0000
+++ b/Doc/tutorial/stdlib.rst	Mon Jun 23 11:23:31 2008 +0000
@@ -150,8 +150,8 @@
 protocols. Two of the simplest are :mod:`urllib.request` for retrieving data
 from urls and :mod:`smtplib` for sending mail::
 
-   >>> import urllib.request
-   >>> for line in urllib.request.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'):
+   >>> from urllib.request import urlopen
+   >>> for line in urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'):
    ...     if 'EST' in line or 'EDT' in line:  # look for Eastern Time
    ...         print(line)