mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
remove extraneous condition
This commit is contained in:
parent
29f843816b
commit
3471bb67e7
1 changed files with 4 additions and 6 deletions
|
|
@ -464,14 +464,12 @@ type_set_bases(PyTypeObject *type, PyObject *value, void *context)
|
||||||
type->tp_name, Py_TYPE(ob)->tp_name);
|
type->tp_name, Py_TYPE(ob)->tp_name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (PyType_Check(ob)) {
|
|
||||||
if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
|
if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"a __bases__ item causes an inheritance cycle");
|
"a __bases__ item causes an inheritance cycle");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
new_base = best_base(value);
|
new_base = best_base(value);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue