Improve the error suggestion for :exc:`NameError` exceptions for instances.
Now if a :exc:`NameError` is raised in a method and the instance has an
attribute that's exactly equal to the name in the exception, the suggestion
will include self.<NAME>
instead of the closest match in the method
scope. Patch by Pablo Galindo
Files
2022-11-05-18-36-27.gh-issue-99139.cI9vV1.rst
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.