Issue 711902: Cause pydoc to show data descriptor doc strings (original) (raw)

Created on 2003-03-29 19:01 by glchapman, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pydoc_patch.txt glchapman,2003-03-29 19:01
pydoc_patch.txt glchapman,2003-04-21 16:31
pydoc_patch2.txt glchapman,2003-04-21 16:34
Messages (5)
msg43233 - (view) Author: Greg Chapman (glchapman) Date: 2003-03-29 19:01
Data descriptors (descriptors having both a __get__ and a __set__ method) often have __doc__ strings. Pydoc displays these for descriptors of type property, but not for other types (e.g., getsets). The attached patch will display __doc__ strings for data descriptors (if available) in the "Data and non-method functions" section of the type description. This patch is intended to be a minimal change. It's possible that inspect.classify_class_attrs should return a new kind for data descriptors (or possibly the "property" kind should include all data descriptors (not just properties)), which could then be handled differently from other non-classified data.
msg43234 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-04-18 20:32
Logged In: YES user_id=21627 The patch looks fine. Can you please also provide a patch for the documentation (libinspect.tex), and the test suite (test_inspect.py)?
msg43235 - (view) Author: Greg Chapman (glchapman) Date: 2003-04-21 16:31
Logged In: YES user_id=86307 Attaching new patch with docs and a couple of tests.
msg43236 - (view) Author: Greg Chapman (glchapman) Date: 2003-04-21 16:34
Logged In: YES user_id=86307 Apparently, Sourceforge won't let me delete the old patch file (I get a permission denied error), so, to avoid confusion, here is the new patch in a file named pydoc_patch2.txt.
msg43237 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-05-03 09:09
Logged In: YES user_id=21627 Thanks for the patch. Applied as libinspect.tex 1.12 inspect.py 1.43 pydoc.py 1.82 test_inspect.py 1.10 NEWS 1.755
History
Date User Action Args
2022-04-10 16:07:57 admin set github: 38235
2003-03-29 19:01:00 glchapman create