# Wrong parameter name in http.client.read documentation: "amt" vs "n"

**URL:** <https://discuss.python.org/t/wrong-parameter-name-in-http-client-read-documentation-amt-vs-n/25284>\
**Category:** Documentation\
**Tags:** documentation\
**Created:** [March 29, 2023, 1:14pm UTC](https://discuss.python.org/t/wrong-parameter-name-in-http-client-read-documentation-amt-vs-n/25284 "2023-03-29T13:14:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwagner](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@bwagner](https://discuss.python.org/u/bwagner)\
**Post date:** [March 29, 2023, 1:14pm UTC](https://discuss.python.org/t/wrong-parameter-name-in-http-client-read-documentation-amt-vs-n/25284/1 "2023-03-29T13:14:25Z")

</div>

`pydoc http.client.HTTPResponse.read`  
results in help text:

```auto
http.client.HTTPResponse.read = read(self, amt=None)
    Read and return up to n bytes.

```

The parameter is called “amt” but the help text refers to “n”.

---

<div class="post-metadata">

**Author:** ![Rosuav](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/rosuav/32/3429_2.png) [@Rosuav](https://discuss.python.org/u/Rosuav)\
**Post date:** [March 29, 2023, 1:32pm UTC](https://discuss.python.org/t/wrong-parameter-name-in-http-client-read-documentation-amt-vs-n/25284/2 "2023-03-29T13:32:00Z")

</div>

Should be an easy enough fix, just change it to say `up to amt bytes`. Want to put in a pull request?

---

<div class="post-metadata">

**Author:** ![CAM-Gerlach](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cam-gerlach/32/3688_2.png) [@CAM-Gerlach](https://discuss.python.org/u/CAM-Gerlach)\
**Post date:** [March 29, 2023, 2:12pm UTC](https://discuss.python.org/t/wrong-parameter-name-in-http-client-read-documentation-amt-vs-n/25284/3 "2023-03-29T14:12:48Z")

</div>

It’s correct in the [prose docs](https://docs.python.org/3/library/http.client.html?highlight=http%20client%20httpresponse#http.client.HTTPResponse.read), and there’s [no docstring where this function is defined](https://github.com/python/cpython/blob/e375bff03736f809fbc234010c087ef9d7e0d384/Lib/http/client.py#L450). It seems its inherited from the [docstring of the C implementation of the BufferedIOBase.read() function](https://github.com/python/cpython/blob/e375bff03736f809fbc234010c087ef9d7e0d384/Modules/_io/bufferedio.c#L133), from which the `HTTPResponse` class ultimately inherits.

However, that docstring is presumably generic for multiple functions (in fact, I’ve seen and edited similar variations elsewhere), I would think it shouldn’t be touched there, and instead the `HTTPResponse.read()` function given a more specifically-tailored docstring of its own including the fix, unless there’s a reason not to do so.

---

<div class="post-metadata">

**Author:** ![bwagner](https://avatars.discourse-cdn.com/v4/letter/b/7feea3/32.png) [@bwagner](https://discuss.python.org/u/bwagner)\
**Post date:** [March 29, 2023, 2:46pm UTC](https://discuss.python.org/t/wrong-parameter-name-in-http-client-read-documentation-amt-vs-n/25284/5 "2023-03-29T14:46:50Z")

</div>

Thank you! Created an [https://github.com/python/cpython/issues/103112](https://issue) and [PR](https://github.com/python/cpython/pull/103113)
