aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/suggestions.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/suggestions.c')
-rw-r--r--Python/suggestions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/suggestions.c b/Python/suggestions.c
index ad58393490e..47aeb08180f 100644
--- a/Python/suggestions.c
+++ b/Python/suggestions.c
@@ -247,7 +247,7 @@ get_suggestions_for_name_error(PyObject* name, PyFrameObject* frame)
}
PyObject *value;
- res = _PyObject_LookupAttr(self, name, &value);
+ res = PyObject_GetOptionalAttr(self, name, &value);
Py_DECREF(locals);
if (res < 0) {
goto error;