mirror of
https://github.com/python/cpython.git
synced 2026-01-07 07:52:29 +00:00
gh-135468: Improve `BaseHandler.http_error_default()` parameter descriptions (#136797)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
This commit is contained in:
parent
8ffc3ef01e
commit
57acd65a30
1 changed files with 7 additions and 4 deletions
|
|
@ -829,10 +829,13 @@ The following attribute and methods should only be used by classes derived from
|
|||
errors. It will be called automatically by the :class:`OpenerDirector` getting
|
||||
the error, and should not normally be called in other circumstances.
|
||||
|
||||
*req* will be a :class:`Request` object, *fp* will be a file-like object with
|
||||
the HTTP error body, *code* will be the three-digit code of the error, *msg*
|
||||
will be the user-visible explanation of the code and *hdrs* will be a mapping
|
||||
object with the headers of the error.
|
||||
:class:`OpenerDirector` will call this method with five positional arguments:
|
||||
|
||||
1. a :class:`Request` object,
|
||||
#. a file-like object with the HTTP error body,
|
||||
#. the three-digit code of the error, as a string,
|
||||
#. the user-visible explanation of the code, as as string, and
|
||||
#. the headers of the error, as a mapping object.
|
||||
|
||||
Return values and exceptions raised should be the same as those of
|
||||
:func:`urlopen`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue