[Python-checkins] CVS: python/dist/src/Misc NEWS,1.284,1.285

Guido van Rossum gvanrossum@users.sourceforge.net
2001年10月18日 12:20:27 -0700


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv18542
Modified Files:
	NEWS 
Log Message:
Note stricter tp_compare return value requirements.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.284
retrieving revision 1.285
diff -C2 -d -r1.284 -r1.285
*** NEWS	2001年10月18日 18:18:06	1.284
--- NEWS	2001年10月18日 19:20:25	1.285
***************
*** 104,107 ****
--- 104,113 ----
 C API
 
+ - The documentation for the tp_compare slot is updated to require that
+ the return value must be -1, 0, 1; an arbitrary number <0 or >0 is
+ not correct. This is not yet enforced but will be enforced in
+ Python 2.3; even later, we may use -2 to indicate errors and +2 for
+ "NotImplemented". Right now, -1 should be used for an error return.
+ 
 - PyLong_AsLongLong() now accepts int (as well as long) arguments.
 Consequently, PyArg_ParseTuple's 'L' code also accepts int (as well

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