@@ -173,12 +173,7 @@ def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
173173 The *cadefault* parameter is ignored.
174174
175175 For http and https urls, this function returns a http.client.HTTPResponse
176- object which has the following HTTPResponse Objects methods.
177-
178- For ftp, file, and data urls and requests explicitly handled by legacy
179- URLopener and FancyURLopener classes, this function returns a
180- urllib.response.addinfourl object which can work as context manager and has
181- methods such as:
176+ object which has the following HTTPResponse Objects methods:
182177
183178 * geturl() - return the URL of the resource retrieved, commonly used to
184179 determine if a redirect was followed
@@ -190,6 +185,11 @@ def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
190185 * getcode() - return the HTTP status code of the response. Raises URLError
191186 on errors.
192187
188+ For ftp, file, and data urls and requests explicitly handled by legacy
189+ URLopener and FancyURLopener classes, this function returns a
190+ urllib.response.addinfourl object which can work as context manager and
191+ also support the geturl(), info(), getcode() methods listed above.
192+
193193 Note that *None& may be returned if no handler handles the request (though
194194 the default installed global OpenerDirector uses UnknownHandler to ensure
195195 this never happens).
0 commit comments