Documentation updates for urllib package. Modified the documentation for the
urllib,urllib2 -> urllib.request,urllib.error
urlparse -> urllib.parse
RobotParser -> urllib.robotparser
Updated tutorial references and other module references (http.client.rst,
ftplib.rst,contextlib.rst)
Updated the examples in the urllib2-howto
Addresses Issue3142.
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 54d2a19..2cd97c2 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -98,9 +98,9 @@
And lets you write code like this::
from contextlib import closing
- import urllib
+ import urllib.request
- with closing(urllib.urlopen('http://www.python.org')) as page:
+ with closing(urllib.request.urlopen('http://www.python.org')) as page:
for line in page:
print(line)