mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
[3.11] gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output (GH-103113) (#103119)
(cherry picked from commit d052a383f1
)
Co-authored-by: Bernhard Wagner <github.comNotification20120125@xmlizer.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Éric <merwok@netwok.org>
This commit is contained in:
parent
cbe14c87c6
commit
ae42c1d168
2 changed files with 2 additions and 0 deletions
|
@ -448,6 +448,7 @@ class HTTPResponse(io.BufferedIOBase):
|
|||
return self.fp is None
|
||||
|
||||
def read(self, amt=None):
|
||||
"""Read and return the response body, or up to the next amt bytes."""
|
||||
if self.fp is None:
|
||||
return b""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue