[Python-checkins] CVS: python/dist/src/Modules xxsubtype.c,2.6,2.7

Guido van Rossum gvanrossum@users.sourceforge.net
2001年9月20日 14:45:28 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv5414/Modules
Modified Files:
	xxsubtype.c 
Log Message:
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.
Index: xxsubtype.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/xxsubtype.c,v
retrieving revision 2.6
retrieving revision 2.7
diff -C2 -d -r2.6 -r2.7
*** xxsubtype.c	2001年09月20日 20:46:18	2.6
--- xxsubtype.c	2001年09月20日 21:45:26	2.7
***************
*** 56,61 ****
 }
 
! static struct getsetlist spamlist_getsets[] = {
! 	{"state", (getter)spamlist_state_get, NULL, NULL},
 	{0}
 };
--- 56,62 ----
 }
 
! static PyGetSetDef spamlist_getsets[] = {
! 	{"state", (getter)spamlist_state_get, NULL,
! 	 "an int variable for demonstration purposes"},
 	{0}
 };

AltStyle によって変換されたページ (->オリジナル) /