Skip to content

gh-122937: Add docs about annotations evaluation order #123060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Aug 16, 2024


1. Value ``'miss-islington'`` will be assigned
to name ``username`` in ``User`` class scope
2. Name ``str`` is evaluated in the annotated assignment statement
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect in Python 3.14.

Copy link
Member Author

@sobolevn sobolevn Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes, right! I guess we need two sections: one for 3.14+ and one for older versions.

How would you best describe the current approach? With a PEP link maybe?

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can only say that the proposed text looks fine, subject to it being true. Given Jelle's comment, we need separate main and branch patches, separately reviewed (or apply this and followup with a main-only patch). I believe the main patch should have a Changed note.

@hugovk hugovk removed the needs backport to 3.12 only security fixes label Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

4 participants