Skip to content

Remodel class scoped name resolution#21216

Open
ChetanKhanna wants to merge 2 commits intopython:masterfrom
ChetanKhanna:fix-class-scope-name-resolution
Open

Remodel class scoped name resolution#21216
ChetanKhanna wants to merge 2 commits intopython:masterfrom
ChetanKhanna:fix-class-scope-name-resolution

Conversation

@ChetanKhanna
Copy link
Copy Markdown
Contributor

@ChetanKhanna ChetanKhanna commented Apr 13, 2026

Refactored to mimic CPython's symantics for name resolution in class scope variables when using LOAD_NAME instead of LOAD_CLASSDEREF

Fixes #9991

Chetan Khanna and others added 2 commits April 14, 2026 02:21
Refactored to mimic CPython's symantics for name resolution
in class scope when using LOAD_NAME instead of LOAD_CLASSDEREF

Works on python#9991
@github-actions
Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/pytester.py:1186: error: Name "ret" is not defined; did you mean "re"?  [name-defined]

@ChetanKhanna ChetanKhanna marked this pull request as ready for review April 14, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Class scope name resolution issue

1 participant