summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial/stdlib.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-06-23 11:23:31 (GMT)
committerGeorg Brandl <georg@python.org>2008-06-23 11:23:31 (GMT)
commit0f7ede45693be57ba51c7aa23a0d841f160de874 (patch)
tree42f8f578bdf60432c9056b2e300529efb1d9c6b4 /Doc/tutorial/stdlib.rst
parentaca8fd7a9dc96143e592076fab4d89cc1691d03f (diff)
downloadcpython-0f7ede45693be57ba51c7aa23a0d841f160de874.zip
cpython-0f7ede45693be57ba51c7aa23a0d841f160de874.tar.gz
cpython-0f7ede45693be57ba51c7aa23a0d841f160de874.tar.bz2
Review the doc changes for the urllib package creation.
Diffstat (limited to 'Doc/tutorial/stdlib.rst')
-rw-r--r--Doc/tutorial/stdlib.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/tutorial/stdlib.rst b/Doc/tutorial/stdlib.rst
index b0c6e8e..9bc0890 100644
--- a/Doc/tutorial/stdlib.rst
+++ b/Doc/tutorial/stdlib.rst
@@ -150,8 +150,8 @@ There are a number of modules for accessing the internet and processing internet
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)