From c65bf3fe4a2bde424b79e350f36b7aaa3f6476f6 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Fri, 23 Mar 2018 18:19:34 +0900 Subject: [PATCH] bpo-32999: ast: Convert useless check to assert (GH-6197) --- Modules/_abc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Modules/_abc.c b/Modules/_abc.c index aa091c717de..562a2e6d730 100644 --- a/Modules/_abc.c +++ b/Modules/_abc.c @@ -647,9 +647,7 @@ _abc__abc_subclasscheck_impl(PyObject *module, PyObject *self, assert(PyTuple_Check(mro)); for (pos = 0; pos < PyTuple_GET_SIZE(mro); pos++) { PyObject *mro_item = PyTuple_GET_ITEM(mro, pos); - if (mro_item == NULL) { - goto end; - } + assert(mro_item != NULL); if ((PyObject *)self == mro_item) { if (_add_to_weak_set(&impl->_abc_cache, subclass) < 0) { goto end;