Issue 3430: httplib.HTTPResponse documentations inconsistent (original) (raw)
The library reference documentation of httplib.HTTPResponse does not match up with the online help documentation, or with the dir() information of a particular instance.
E.g. the list of public features in the library reference (http://docs.python.org/lib/httpresponse-objects.html) is:
- read
- getheader
- getheaders
- msg
- version
- status
- reason
From the online documentation (with 'help(httplib.HTTPResponse)'):
- begin
- close
- getheader
- getheaders
- isclosed
- read
And from a class instance (via 'dir(httpResponseInstance)'):
- 'begin',
- 'chunk_left',
- 'chunked',
- 'close',
- 'debuglevel',
- 'fp',
- 'getheader',
- 'getheaders',
- 'isclosed',
- 'length',
- 'msg',
- 'read',
- 'reason',
- 'status',
- 'strict',
- 'version',
- 'will_close'
Still applies. Neither the 2.7 documentation has changed (judging from the current online dev docs), nor the implementation (judging from current svn). So my first two lists are still valid. I cannot comment on the third, as I don't have a 2.7 installation at hand, or will have any time soon.
Docs are still as deficient in 3.3, and so I presume in 3.4.
Part of the discrepancy between the first two lists is that data attributes msg, version, status, and reason are instance-only attributes.
#19154 is (now) about improving fileno doc. That, some other methods, are missing doctrings, making help(method) useless.
A big change in 3.x is that HTTPResponse now subclasses io.RawIOBase and hence inherits or implements even more (undocumented) methods than listed here. I suppose they could be documented by reference to the base class, if that is the normal procedure when subclassing.