Skip to content
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

Typing: improve docs on the type of class objects #106081

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Jun 25, 2023

The docs on typing.Type[T] mostly contain information that applies equally well to type[T]. Move that information out of the entry for typing.Type[T], and into its own section. Move the reduced entry for typing.Type[T] into the "Deprecated aliases" section.

Also improve the code examples slightly, and remove a reference to how PEP-484 might change in the future.


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

@hauntsaninja hauntsaninja merged commit 3eeb8c8 into python:main Jun 26, 2023
@miss-islington
Copy link
Contributor

Thanks @AlexWaygood for the PR, and @hauntsaninja for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-106096 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Jun 26, 2023
@bedevere-bot
Copy link

GH-106097 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jun 26, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 26, 2023
(cherry picked from commit 3eeb8c8)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 26, 2023
(cherry picked from commit 3eeb8c8)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
AlexWaygood added a commit that referenced this pull request Jun 26, 2023
…106096)

Improve typing docs on the type of class objects (GH-106081)
(cherry picked from commit 3eeb8c8)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
AlexWaygood added a commit that referenced this pull request Jun 26, 2023
…106097)

Improve typing docs on the type of class objects (GH-106081)
(cherry picked from commit 3eeb8c8)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@AlexWaygood AlexWaygood deleted the type-t-docs branch June 26, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants