[Python-checkins] cpython: I have been spoiled by chained comparisons in python

benjamin.peterson python-checkins at python.org
Wed Aug 3 01:34:39 CEST 2011


http://hg.python.org/cpython/rev/b1cc72f66ec9
changeset:   71711:b1cc72f66ec9
user:        Benjamin Peterson <benjamin at python.org>
date:        Tue Aug 02 18:34:30 2011 -0500
summary:
  I have been spoiled by chained comparisons in python

files:
  Modules/posixmodule.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4952,7 +4952,7 @@
             Py_INCREF(Py_NotImplemented); \
             return Py_NotImplemented; \
         } \
-        assert(left->size == right->size == res->size); \
+        assert(left->size == right->size && right->size == res->size); \
         op(res->size, res->set, left->set, right->set); \
         return (PyObject *)res; \
     } \

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list