Skip to content

Commit 16de50a

Browse files
Fix asserts
1 parent bb8a69d commit 16de50a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/ceval.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ _PyEval_MatchClass(PyThreadState *tstate, PyObject *subject, PyObject *type,
604604
}
605605
if (match_self) {
606606
// Easy. Copy the subject itself, and move on to kwargs.
607-
assert(PyTuple_GET_ITEM(attrs, 0) == NULL);
607+
assert(PyTuple_GET_ITEM(attrs, 0) == Py_None);
608608
PyTuple_SET_ITEM(attrs, 0, Py_NewRef(subject));
609609
}
610610
else {
@@ -621,7 +621,7 @@ _PyEval_MatchClass(PyThreadState *tstate, PyObject *subject, PyObject *type,
621621
if (attr == NULL) {
622622
goto fail;
623623
}
624-
assert(PyTuple_GET_ITEM(attrs, i) == NULL);
624+
assert(PyTuple_GET_ITEM(attrs, i) == Py_None);
625625
PyTuple_SET_ITEM(attrs, i, attr);
626626
}
627627
}
@@ -634,7 +634,7 @@ _PyEval_MatchClass(PyThreadState *tstate, PyObject *subject, PyObject *type,
634634
if (attr == NULL) {
635635
goto fail;
636636
}
637-
assert(PyTuple_GET_ITEM(attrs, nargs + i) == NULL);
637+
assert(PyTuple_GET_ITEM(attrs, nargs + i) == Py_None);
638638
PyTuple_SET_ITEM(attrs, nargs + i, attr);
639639
}
640640
Py_XDECREF(seen);

0 commit comments

Comments
 (0)