Commit 08570dec authored by Guido van Rossum's avatar Guido van Rossum

Uses PyErr_ExceptionMatches() instead of comparing PyErr_Occurred().

parent 41e825a8
......@@ -1158,7 +1158,7 @@ PySequence_Contains(w, v) /* v in w */
for (i = 0; ; i++) {
x = (*sq->sq_item)(w, i);
if (x == NULL) {
if (PyErr_Occurred() == PyExc_IndexError) {
if (PyErr_ExceptionMatches(PyExc_IndexError)) {
PyErr_Clear();
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment