This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: help(obj) should use __doc__ when available
Type: enhancement Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, kern
Priority: normal Keywords:

Created on 2003-11-16 23:05 by kern, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg60423 - (view) Author: Robert Kern (kern) Date: 2003-11-16 23:05
Suppose one makes a C extension type that is callable and has a 
__doc__ attribute. Currently, calling help() on the object yields 
something like the following: 
 
>>> help(scipy.linalg._flinalg.slu_c) 
Help on fortran: 
 
<fortran object> 
>>> hasattr(scipy.linalg._flinalg.slu_c, '__doc__') 
True 
>>> 
 
help() could give more useful information by modifying 
pydoc.TextDoc.docother to check for a __doc__ attribute and add it 
(just as docother checks for the 'doc' keyword). 
msg71509 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-08-20 02:56
I believe this has been implemented now.
History
Date User Action Args
2022-04-11 14:56:01adminsetgithub: 39558
2008-08-20 02:56:52benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg71509
nosy: + benjamin.peterson
2003-11-16 23:05:12kerncreate