[Patches] [ python-Patches-711902 ] Cause pydoc to show data descriptor __doc__ strings
SourceForge.net
noreply@sourceforge.net
Mon, 21 Apr 2003 09:31:39 -0700
Patches item #711902, was opened at 2003-03-29 10:01
Message generated for change (Comment added) made by glchapman
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=711902&group_id=5470
Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Greg Chapman (glchapman)
Assigned to: Martin v. Löwis (loewis)
Summary: Cause pydoc to show data descriptor __doc__ strings
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: Greg Chapman (glchapman)
Date: 2003-04-21 08:31
Message:
Logged In: YES
user_id=86307
Attaching new patch with docs and a couple of tests.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-04-18 12:32
Message:
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)?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=711902&group_id=5470