cpython: b55c006b79bc (original) (raw)
Mercurial > cpython
changeset 99371:b55c006b79bc 3.5
Issue #22989, #21228: Merge urlopen() doc from 3.4 into 3.5 [#22989]
Martin Panter vadmium+py@gmail.com | |
---|---|
date | Thu, 26 Nov 2015 11:03:50 +0000 |
parents | 38f749f0a1bd(current diff)fa3c9faabfb0(diff) |
children | c6930661599b 5d6b2dc7e3d0 |
files | Doc/library/urllib.request.rst Misc/ACKS |
diffstat | 2 files changed, 14 insertions(+), 7 deletions(-)[+] [-] Doc/library/urllib.request.rst 20 Misc/ACKS 1 |
line wrap: on
line diff
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -59,13 +59,7 @@ The :mod:urllib.request
module defines
The cadefault parameter is ignored.
- For http and https urls, this function returns a
- :class:
http.client.HTTPResponse
object which has the following - :ref:
httpresponse-objects
methods. - - For ftp, file, and data urls and requests explicitly handled by legacy
- :class:
URLopener
and :class:FancyURLopener
classes, this function - returns a :class:
urllib.response.addinfourl
object which can work as
- This function always returns an object which can work as
:term:
context manager
and has methods such as - For http and https urls, this function returns a
- :class:
http.client.HTTPResponse
object slightly modified. In addition - to the three new methods above, the msg attribute contains the
- same information as the :attr:
~http.client.HTTPResponse.reason
- attribute --- the reason phrase returned by server --- instead of
- the response headers as it is specified in the documentation for
- :class:
~http.client.HTTPResponse
. + - For ftp, file, and data urls and requests explicitly handled by legacy
- :class:
URLopener
and :class:FancyURLopener
classes, this function - returns a :class:
urllib.response.addinfourl
object. + Raises :exc:~urllib.error.URLError
on errors. Note thatNone
may be returned if no handler handles the request (though
--- a/Misc/ACKS +++ b/Misc/ACKS @@ -443,6 +443,7 @@ Arnaud Fontaine Michael Foord Amaury Forgeot d'Arc Doug Fort +Evens Fortuné Chris Foster John Fouhy Andrew Francis