summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-25 06:30:51 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-25 06:30:51 (GMT)
commitf33532cfef6f613200c2ba5e7fe09ce492fd63e4 (patch)
treebdb3d41a4c711bc6276ae6a0b9b23804447acc57 /Lib/pydoc.py
parentc39553ad0db2d973ca40ec9d78cf6e9c2509ddbc (diff)
downloadcpython-f33532cfef6f613200c2ba5e7fe09ce492fd63e4.zip
cpython-f33532cfef6f613200c2ba5e7fe09ce492fd63e4.tar.gz
cpython-f33532cfef6f613200c2ba5e7fe09ce492fd63e4.tar.bz2
+ Display property functions in the same order they're specified to
property() (get, set, del; not set, get, del). + Change "Data defined/inherited in ..." header lines to "Data and non-method functions defined/inherited in ...". Things like the value of __class__, and __new__, and class vrbls like the i in class C: i = int show up in this section too. I don't think it's worth a separate section to distinguish them from non-callable attrs, and there's no obvious reliable way to distinguish callable from non-callable attrs anyway.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 78ec714..a6f026b 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -646,8 +646,8 @@ TT { font-family: lucidatypewriter, lucida console, courier }
doc = self.markup(value.__doc__, self.preformat,
funcs, classes, mdict)
push('<dd><tt>%s</tt></dd>\n' % doc)
- for attr, tag in [("fset", " setter"),
- ("fget", " getter"),
+ for attr, tag in [("fget", " getter"),
+ ("fset", " setter"),
("fdel", " deleter")]:
func = getattr(value, attr)
if func is not None:
@@ -713,7 +713,7 @@ TT { font-family: lucidatypewriter, lucida console, courier }
lambda t: t[1] == 'static method')
attrs = spillproperties("Properties %s" % tag, attrs,
lambda t: t[1] == 'property')
- attrs = spilldata("Data %s" % tag, attrs,
+ attrs = spilldata("Data and non-method functions %s" % tag, attrs,
lambda t: t[1] == 'data')
assert attrs == []
@@ -1030,8 +1030,8 @@ class TextDoc(Doc):
if doc:
push(self.indent(doc))
need_blank_after_doc = 1
- for attr, tag in [("fset", " setter"),
- ("fget", " getter"),
+ for attr, tag in [("fget", " getter"),
+ ("fset", " setter"),
("fdel", " deleter")]:
func = getattr(value, attr)
if func is not None:
@@ -1081,8 +1081,8 @@ class TextDoc(Doc):
lambda t: t[1] == 'static method')
attrs = spillproperties("Properties %s:\n" % tag, attrs,
lambda t: t[1] == 'property')
- attrs = spilldata("Data %s:\n" % tag, attrs,
- lambda t: t[1] == 'data')
+ attrs = spilldata("Data and non-method functions %s:\n" % tag,
+ attrs, lambda t: t[1] == 'data')
assert attrs == []
# Split off the attributes inherited from the next class (note