diff Objects/methodobject.c @ 20015:ca7af2a5d915 legacy-trunk

Add optional docstrings to getset descriptors. Fortunately, there's no backwards compatibility to worry about, so I just pushed the 'closure' struct member to the back -- it's never used in the current code base (I may eliminate it, but that's more work because the getter and setter signatures would have to change.) As examples, I added actual docstrings to the getset attributes of a few types: file.closed, xxsubtype.spamdict.state.
author Guido van Rossum <guido@python.org>
date Thu, 20 Sep 2001 21:45:26 +0000
parents 00de719ae831
children 7ca46e08200d 132a064da656
line wrap: on
line diff
--- a/Objects/methodobject.c	Thu Sep 20 21:39:07 2001 +0000
+++ b/Objects/methodobject.c	Thu Sep 20 21:45:26 2001 +0000
@@ -159,7 +159,7 @@
 	return self;
 }
 
-static struct getsetlist meth_getsets [] = {
+static PyGetSetDef meth_getsets [] = {
 	{"__doc__",  (getter)meth_get__doc__,  NULL, NULL},
 	{"__name__", (getter)meth_get__name__, NULL, NULL},
 	{"__self__", (getter)meth_get__self__, NULL, NULL},