Commit 2dd0104d authored by Georg Brandl's avatar Georg Brandl

#5357: fix incomprehensible paragraph in urlopen() doc.

parent 38e3d51e
...@@ -37,20 +37,20 @@ The :mod:`urllib.request` module defines the following functions: ...@@ -37,20 +37,20 @@ The :mod:`urllib.request` module defines the following functions:
* :meth:`geturl` --- return the URL of the resource retrieved, commonly used to * :meth:`geturl` --- return the URL of the resource retrieved, commonly used to
determine if a redirect was followed determine if a redirect was followed
* :meth:`info` --- return the meta-information of the page, such as headers, in * :meth:`info` --- return the meta-information of the page, such as headers,
the form of an ``http.client.HTTPMessage`` instance in the form of an ``http.client.HTTPMessage`` instance (see `Quick
(see `Quick Reference to HTTP Headers <http://www.cs.tut.fi/~jkorpela/http.html>`_) Reference to HTTP Headers <http://www.cs.tut.fi/~jkorpela/http.html>`_)
Raises :exc:`URLError` on errors. Raises :exc:`URLError` on errors.
Note that ``None`` may be returned if no handler handles the request (though the Note that ``None`` may be returned if no handler handles the request (though
default installed global :class:`OpenerDirector` uses :class:`UnknownHandler` to the default installed global :class:`OpenerDirector` uses
ensure this never happens). :class:`UnknownHandler` to ensure this never happens).
The urlopen function from the previous version, Python 2.6 and earlier, of
the module urllib has been discontinued as urlopen can return the The legacy ``urllib.urlopen`` function from Python 2.6 and earlier has been
file-object as the previous. The proxy handling, which in earlier was passed discontinued; :func:`urlopen` corresponds to the old ``urllib2.urlopen``.
as a dict parameter to urlopen can be availed by the use of Proxy handling, which was done by passing a dictionary parameter to
:class:`ProxyHandler` objects. ``urllib.urlopen``, can be obtained by using :class:`ProxyHandler` objects.
.. function:: install_opener(opener) .. function:: install_opener(opener)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment