[Python-3000-checkins] r54588 - in python/branches/p3yk: Lib/test/test_compare.py Misc/NEWS Objects/typeobject.c (original) (raw)

guido.van.rossum python-3000-checkins at python.org
Wed Mar 28 00:37:39 CEST 2007


Author: guido.van.rossum Date: Wed Mar 28 00:37:34 2007 New Revision: 54588

Modified: python/branches/p3yk/Lib/test/test_compare.py python/branches/p3yk/Misc/NEWS python/branches/p3yk/Objects/typeobject.c Log: By default, != returns the opposite of ==, unless the latter returns NotImplemented.

(Is this worth backporting to 2.6? It seems so useful...!)

Modified: python/branches/p3yk/Lib/test/test_compare.py

--- python/branches/p3yk/Lib/test/test_compare.py (original) +++ python/branches/p3yk/Lib/test/test_compare.py Wed Mar 28 00:37:34 2007 @@ -39,6 +39,12 @@ self.assertEqual(a == b, id(a) == id(b), 'a=%r, b=%r' % (a, b))

Modified: python/branches/p3yk/Misc/NEWS

--- python/branches/p3yk/Misc/NEWS (original) +++ python/branches/p3yk/Misc/NEWS Wed Mar 28 00:37:34 2007 @@ -28,6 +28,9 @@ Core and Builtins

+- By default, != returns the opposite of ==, unless the latter returns

Modified: python/branches/p3yk/Objects/typeobject.c

--- python/branches/p3yk/Objects/typeobject.c (original) +++ python/branches/p3yk/Objects/typeobject.c Wed Mar 28 00:37:34 2007 @@ -2314,7 +2314,22 @@ break;

 case Py_NE:


More information about the Python-3000-checkins mailing list