[Python-checkins] CVS: python/dist/src/Lib pydoc.py,1.49,1.50
Tim Peters
tim_one@users.sourceforge.net
Mon, 24 Sep 2001 23:30:53 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv30931/python/Lib
Modified Files:
pydoc.py
Log Message:
+ 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.
Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** pydoc.py 2001/09/25 03:18:32 1.49
--- pydoc.py 2001/09/25 06:30:51 1.50
***************
*** 647,652 ****
funcs, classes, mdict)
push('<dd><tt>%s</tt></dd>\n' % doc)
! for attr, tag in [("fset", " setter"),
! ("fget", " getter"),
("fdel", " deleter")]:
func = getattr(value, attr)
--- 647,652 ----
funcs, classes, mdict)
push('<dd><tt>%s</tt></dd>\n' % doc)
! for attr, tag in [("fget", " getter"),
! ("fset", " setter"),
("fdel", " deleter")]:
func = getattr(value, attr)
***************
*** 714,718 ****
attrs = spillproperties("Properties %s" % tag, attrs,
lambda t: t[1] == 'property')
! attrs = spilldata("Data %s" % tag, attrs,
lambda t: t[1] == 'data')
assert attrs == []
--- 714,718 ----
attrs = spillproperties("Properties %s" % tag, attrs,
lambda t: t[1] == 'property')
! attrs = spilldata("Data and non-method functions %s" % tag, attrs,
lambda t: t[1] == 'data')
assert attrs == []
***************
*** 1031,1036 ****
push(self.indent(doc))
need_blank_after_doc = 1
! for attr, tag in [("fset", " setter"),
! ("fget", " getter"),
("fdel", " deleter")]:
func = getattr(value, attr)
--- 1031,1036 ----
push(self.indent(doc))
need_blank_after_doc = 1
! for attr, tag in [("fget", " getter"),
! ("fset", " setter"),
("fdel", " deleter")]:
func = getattr(value, attr)
***************
*** 1082,1087 ****
attrs = spillproperties("Properties %s:\n" % tag, attrs,
lambda t: t[1] == 'property')
! attrs = spilldata("Data %s:\n" % tag, attrs,
! lambda t: t[1] == 'data')
assert attrs == []
--- 1082,1087 ----
attrs = spillproperties("Properties %s:\n" % tag, attrs,
lambda t: t[1] == 'property')
! attrs = spilldata("Data and non-method functions %s:\n" % tag,
! attrs, lambda t: t[1] == 'data')
assert attrs == []