Repository navigation
Conversation
55169df to
c2f4f31
Compare
| PyObject *ste_children; /* list of child blocks */ | ||
| PyObject *ste_directives;/* locations of global and nonlocal statements */ | ||
| PyObject *ste_mangled_names; /* set of names for which mangling should be applied */ | ||
| PyObject *ste_mangled_names; /* type parameter names in a generic class header */ |
There was a problem hiding this comment.
Why changing this comment? the naming of the field is also clearly wwrong if it's only for type params now.
| } | ||
| st->st_private = s->v.ClassDef.name; | ||
| st->st_cur->ste_mangled_names = PySet_New(NULL); | ||
| Py_XSETREF(st->st_cur->ste_mangled_names, PySet_New(NULL)); |
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
Thank you for your interest in contributing to Python. This is a community-driven project, and we want it to be a welcoming place to learn and collaborate. Contributors are responsible for reviewing and understanding what they submit, checking its claims, and being able to explain changes in their own words. This helps reviewers focus on the contribution and leaves more time to support other contributors. We believe this contribution does not meet our guidelines for using AI tools, so we're closing it. If you think we've misunderstood your contribution, please let us know. You're welcome to explain your approach or ask questions about the guidelines. Please read our guidelines for using AI tools. |
Fixes #162574.
Nested generic class headers resolve private names using the enclosing lexical class's mangling context. Private type-parameter names continue to use the generic class's own context, preserving their behavior in bounds, bases, and class bodies.
Validation:
./python.exe -m test -j2(52,574 tests run; passed; expected platform/resource skips)./python.exe -m test -j2 test_type_params test_type_aliases test_symtable test_compile test_typing(1,156 tests; two skipped)./python.exe -m test -R 3:2 test_type_params test_symtable(174 tests)make patchcheckAI disclosure: AI assistance was used to prepare this PR.