[Patches] [ python-Patches-711902 ] Cause pydoc to show data descriptor __doc__ strings
SourceForge.net
noreply@sourceforge.net
Sat, 29 Mar 2003 11:01:00 -0800
Patches item #711902, was opened at 2003-03-29 10:01
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: Nobody/Anonymous (nobody)
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.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=711902&group_id=5470