]> granicus.if.org Git - python/commitdiff
Note stricter tp_compare return value requirements.
authorGuido van Rossum <guido@python.org>
Thu, 18 Oct 2001 19:20:25 +0000 (19:20 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 18 Oct 2001 19:20:25 +0000 (19:20 +0000)
Misc/NEWS

index a91b7afec4cfecd37cf6261f27f1410716db77d6..6d6c65928faaa1ce4ff36621f323d5ecc2296991 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -103,6 +103,12 @@ Build
 
 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
   as long) arguments.