Skip to content

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

Open
sobolevn wants to merge 1 commit into
python:mainfrom
sobolevn:issue-122937
Open

gh-122937: Add docs about annotations evaluation order#123060
sobolevn wants to merge 1 commit into
python:mainfrom
sobolevn:issue-122937

Conversation

@sobolevn
Copy link
Copy Markdown
Member

@sobolevn sobolevn commented Aug 16, 2024

Comment thread Doc/howto/annotations.rst

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 8, 2025
@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 18, 2026
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 30, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label May 30, 2026
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 needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

5 participants