mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
code style
This commit is contained in:
parent
5e703cf32b
commit
72288d4f3c
1 changed files with 4 additions and 8 deletions
|
@ -2500,12 +2500,10 @@ recursive_isinstance(PyObject *inst, PyObject *cls)
|
|||
if (retval == 0) {
|
||||
PyObject *c = PyObject_GetAttr(inst, __class__);
|
||||
if (c == NULL) {
|
||||
if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
|
||||
if (PyErr_ExceptionMatches(PyExc_AttributeError))
|
||||
PyErr_Clear();
|
||||
}
|
||||
else {
|
||||
else
|
||||
retval = -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (c != (PyObject *)(inst->ob_type) &&
|
||||
|
@ -2523,12 +2521,10 @@ recursive_isinstance(PyObject *inst, PyObject *cls)
|
|||
return -1;
|
||||
icls = PyObject_GetAttr(inst, __class__);
|
||||
if (icls == NULL) {
|
||||
if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
|
||||
if (PyErr_ExceptionMatches(PyExc_AttributeError))
|
||||
PyErr_Clear();
|
||||
}
|
||||
else {
|
||||
else
|
||||
retval = -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
retval = abstract_issubclass(icls, cls);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue