Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-134370 Added clarification on instances annotations#134387

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

AlexKautz
Copy link
Contributor

@AlexKautzAlexKautz commentedMay 20, 2025
edited by github-actionsbot
Loading

[Hello from PyCon sprints!]
Instances of classes cannot have annotations,
however sometimes they will erroneously have the
annotations attribute.

@python/proofreaders could you take a look? This is my first Python documentation writing so I'm sure there's a mistake somewhere :).


📚 Documentation preview 📚:https://cpython-previews--134387.org.readthedocs.build/

Instances of classes cannot have annotations,however sometimes they will erroneously have the__annotations__ attribute
Copy link
Contributor

@willingcwillingc left a comment

Choose a reason for hiding this comment

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

These changes look good to me. I would like@JelleZijlstra to also review from a typing perspective. Thank you@AlexKautz.

AlexKautz and gpshead reacted with heart emoji
@AlexKautz
Copy link
ContributorAuthor

I also swapped ae.g. forfor example followinghttps://devguide.python.org/documentation/style-guide/#use-simple-language

@JelleZijlstraJelleZijlstra added needs backport to 3.13bugs and security fixes needs backport to 3.14bugs and security fixes labelsMay 22, 2025
@JelleZijlstraJelleZijlstra merged commitbd4046f intopython:mainMay 22, 2025
28 checks passed
@github-project-automationgithub-project-automationbot moved this fromTodo toDone inDocs PRsMay 22, 2025
@miss-islington-app
Copy link

Thanks@AlexKautz for the PR, and@JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 22, 2025
…H-134387)Instances of classes cannot have annotations,however sometimes they will erroneously have the__annotations__ attribute(cherry picked from commitbd4046f)Co-authored-by: Alex Kautz <alex@takemobi.com>
@miss-islington-app
Copy link

Sorry,@AlexKautz and@JelleZijlstra, I could not cleanly backport this to3.13 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker bd4046f4f869039a1a2ebe2d1d18bfbc2a2951b6 3.13

@bedevere-app
Copy link

GH-134509 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 22, 2025
@JelleZijlstraJelleZijlstra removed the needs backport to 3.13bugs and security fixes labelMay 22, 2025
JelleZijlstra pushed a commit that referenced this pull requestMay 22, 2025
) (#134509)gh-134370: Added clarification on instance annotations (GH-134387)Instances of classes cannot have annotations,however sometimes they will erroneously have the__annotations__ attribute(cherry picked from commitbd4046f)Co-authored-by: Alex Kautz <alex@takemobi.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JelleZijlstraJelleZijlstraJelleZijlstra approved these changes

@willingcwillingcwillingc approved these changes

Assignees

@JelleZijlstraJelleZijlstra

Labels
docsDocumentation in the Doc dirskip news
Projects
Status: Done
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@AlexKautz@JelleZijlstra@willingc

[8]ページ先頭

©2009-2025 Movatter.jp