bpo-32999: ast: Convert useless check to assert (GH-6197)

(cherry picked from commit c65bf3fe4a)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2018-03-23 02:43:11 -07:00 committed by GitHub
parent 3b4c6b16c5
commit c71edab15d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;