Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Python/suggestions.c
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
  • Loading branch information
pablogsal and isidentical authored Nov 6, 2022
commit d8933dd20198468692aad4cb1574fc96200d6406
1 change: 1 addition & 0 deletions Python/suggestions.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ get_suggestions_for_name_error(PyObject* name, PyFrameObject* frame)
}

if (PyObject_HasAttr(self, name)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use PyObject_HasAttr. It is broken by design.

Py_DECREF(dir);
return PyUnicode_FromFormat("self.%S", name);
Comment thread
pablogsal marked this conversation as resolved.
}
}
Expand Down