bpo-32999: ast: Convert useless check to assert (GH-6197)
This commit is contained in:
parent
56970b8ce9
commit
c65bf3fe4a
|
@ -647,9 +647,7 @@ _abc__abc_subclasscheck_impl(PyObject *module, PyObject *self,
|
||||||
assert(PyTuple_Check(mro));
|
assert(PyTuple_Check(mro));
|
||||||
for (pos = 0; pos < PyTuple_GET_SIZE(mro); pos++) {
|
for (pos = 0; pos < PyTuple_GET_SIZE(mro); pos++) {
|
||||||
PyObject *mro_item = PyTuple_GET_ITEM(mro, pos);
|
PyObject *mro_item = PyTuple_GET_ITEM(mro, pos);
|
||||||
if (mro_item == NULL) {
|
assert(mro_item != NULL);
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
if ((PyObject *)self == mro_item) {
|
if ((PyObject *)self == mro_item) {
|
||||||
if (_add_to_weak_set(&impl->_abc_cache, subclass) < 0) {
|
if (_add_to_weak_set(&impl->_abc_cache, subclass) < 0) {
|
||||||
goto end;
|
goto end;
|
||||||
|
|
Loading…
Reference in New Issue