diff -r e063f1b724d7 Doc/library/urllib.request.rst --- a/Doc/library/urllib.request.rst Tue Mar 13 00:16:17 2012 -0700 +++ b/Doc/library/urllib.request.rst Tue Mar 13 04:52:11 2012 -0400 @@ -46,7 +46,8 @@ If neither *cafile* nor *capath* is specified, an HTTPS request will not do any verification of the server's certificate. - This function returns a file-like object with two additional methods from + This function returns a file-like object that supports the Context Manager + protocol, with two additional methods from the :mod:`urllib.response` module * :meth:`geturl` --- return the URL of the resource retrieved, @@ -1007,6 +1008,14 @@ >> with urllib.request.urlopen('http://www.python.org/') as f: + ... print(f.read(100).decode('utf-8')) + ... +