Skip to content

Commit 4e5b379

Browse files
committed
Move description to base method (http_error_default())
1 parent 98aafdb commit 4e5b379

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

Doc/library/urllib.request.rst

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -829,10 +829,13 @@ The following attribute and methods should only be used by classes derived from
829829
errors. It will be called automatically by the :class:`OpenerDirector` getting
830830
the error, and should not normally be called in other circumstances.
831831

832-
*req* will be a :class:`Request` object, *fp* will be a file-like object with
833-
the HTTP error body, *code* will be the three-digit code of the error, *msg*
834-
will be the user-visible explanation of the code and *hdrs* will be a mapping
835-
object with the headers of the error.
832+
:class:`OpenerDirector` will call this method with five positional arguments:
833+
834+
1. a :class:`Request` object,
835+
#. a file-like object with the HTTP error body,
836+
#. the three-digit code of the error, as a string,
837+
#. the user-visible explanation of the code, as as string, and
838+
#. the headers of the error, as a mapping object.
836839

837840
Return values and exceptions raised should be the same as those of
838841
:func:`urlopen`.
@@ -916,13 +919,6 @@ HTTPRedirectHandler Objects
916919

917920
Redirect to the ``Location:`` or ``URI:`` URL. This method is called by the
918921
parent :class:`OpenerDirector` when getting an HTTP 'moved permanently' response.
919-
:class:`OpenerDirector` will call this method with five positional arguments:
920-
921-
* a :class:`Request` object,
922-
* a file-like object with the HTTP error body,
923-
* the three-digit code of the error, as a string,
924-
* the user-visible explanation of the code, as as string, and
925-
* the headers of the error, as a mapping object.
926922

927923

928924
.. method:: HTTPRedirectHandler.http_error_302(req, fp, code, msg, hdrs)

0 commit comments

Comments
 (0)