GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — gh-135797: Add _field_types to abstract AST classes by Wojusensei · Pull Request #159567 · python/cpython Conversation
|
Documentation build overview
4 files changed± library/ast.html± library/calendar.html± library/test.html± whatsnew/changelog.html |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Classes without fields never got a _field_types dictionary, so the attribute was missing on ast.AST and on the abstract classes such as ast.mod, while typeshed declares it on ast.AST. make_type() now sets an empty dictionary on every class it creates, and ast.AST gets one too; add_ast_annotations() keeps filling in the concrete classes. The constructor relied on the missing attribute to detect user subclasses that declare _fields but no _field_types, and those must keep working as before 3.13. An empty dictionary is treated the same way now, otherwise they would start failing with a missing-field TypeError.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.