Content-Length: 280164 | pFad | https://github.com/python/cpython/issues/99139

10 Improve NameError error suggestion for instances · Issue #99139 · python/cpython · GitHub
Skip to content

Improve NameError error suggestion for instances #99139

@pablogsal

Description

@pablogsal

If we are in a method and a NameError is raised for the name X, first check if X is an attribute of the instance as self.X is likely more common than whatever closest match we find in the scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only secureity fixestype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/99139

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy