We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7654ab9 commit 3a61943Copy full SHA for 3a61943
1 file changed
Python/Python-ast.c
@@ -772,12 +772,13 @@ static int add_ast_fields(void)
772
773
static int exists_not_none(PyObject *obj, _Py_Identifier *id)
774
{
775
+ int isnone;
776
PyObject *attr = _PyObject_GetAttrId(obj, id);
777
if (!attr) {
778
PyErr_Clear();
779
return 0;
780
}
- int isnone = attr == Py_None;
781
+ isnone = attr == Py_None;
782
Py_DECREF(attr);
783
return !isnone;
784
0 commit comments