Skip to content

gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output #103113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 29, 2023
1 change: 1 addition & 0 deletions Lib/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ def isclosed(self):
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""

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add docstring to :meth:`http.client.HTTPResponse.read` to fix ``pydoc`` output.