Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5 lines (5 loc) · 326 Bytes

2022-11-05-18-36-27.gh-issue-99139.cI9vV1.rst

File metadata and controls

5 lines (5 loc) · 326 Bytes

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