diff options
author | Guido van Rossum <guido@python.org> | 2001-09-20 21:45:26 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-09-20 21:45:26 +0000 |
commit | 08a9a58b8f3897afca8c5ad3c43e0d7726a3da55 (patch) | |
tree | f31f00e00cd6acbff5ad10a0b6d1befa4b7b7b6d /Objects/funcobject.c | |
parent | 3568e61250835523cefb44989de8dcdf04b21a1b (diff) | |
download | cpython-08a9a58b8f3897afca8c5ad3c43e0d7726a3da55.tar.gz |
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.
Diffstat (limited to 'Objects/funcobject.c')
-rw-r--r-- | Objects/funcobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index e1cf080862..4e77d52434 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -257,7 +257,7 @@ func_set_defaults(PyFunctionObject *op, PyObject *value) return 0; } -static struct getsetlist func_getsetlist[] = { +static PyGetSetDef func_getsetlist[] = { {"func_code", (getter)func_get_code, (setter)func_set_code}, {"func_defaults", (getter)func_get_defaults, (setter)func_set_defaults}, |