]> granicus.if.org Git - python/commitdiff
use logical rather than bit and
authorBenjamin Peterson <benjamin@python.org>
Sun, 11 May 2014 23:17:02 +0000 (16:17 -0700)
committerBenjamin Peterson <benjamin@python.org>
Sun, 11 May 2014 23:17:02 +0000 (16:17 -0700)
Modules/operator.c

index 7cbb45e7db67d92f1e9d78c9819bc5bffcd3caaa..375592c1eb170136e4c37d34e4161dd5c065f43e 100644 (file)
@@ -319,7 +319,7 @@ compare_digest(PyObject *self, PyObject *args)
         Py_buffer view_a;
         Py_buffer view_b;
 
-        if ((PyObject_CheckBuffer(a) == 0) & (PyObject_CheckBuffer(b) == 0)) {
+        if (PyObject_CheckBuffer(a) == 0 && PyObject_CheckBuffer(b) == 0) {
             PyErr_Format(PyExc_TypeError,
                          "unsupported operand types(s) or combination of types: "
                          "'%.100s' and '%.100s'",