Skip to content

Improve typing.TypeGuard docstring #117521

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

Closed
JelleZijlstra opened this issue Apr 3, 2024 · 2 comments
Closed

Improve typing.TypeGuard docstring #117521

JelleZijlstra opened this issue Apr 3, 2024 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir topic-typing

Comments

@JelleZijlstra
Copy link
Member

JelleZijlstra commented Apr 3, 2024

The current docstring for typing.TypeGuard includes a single example, but that example does not use TypeGuard, and in fact demonstrates behavior that differs from that of TypeGuard in essential ways. It would be less confusing if the TypeGuard example actually exemplified TypeGuard.

Linked PRs

@JelleZijlstra JelleZijlstra added docs Documentation in the Doc dir topic-typing labels Apr 3, 2024
@JelleZijlstra JelleZijlstra self-assigned this Apr 3, 2024
JelleZijlstra added a commit to JelleZijlstra/cpython that referenced this issue Apr 3, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 4, 2024
JelleZijlstra added a commit that referenced this issue Apr 4, 2024
@nineteendo
Copy link
Contributor

Can this be closed, or must this be backported to 3.11?

@AlexWaygood
Copy link
Member

It can't be backported any further than it already has been, as Python 3.11 is no longer accepting any changes unless they relate to security issues. So this can be closed now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir topic-typing
Projects
None yet
Development

No branches or pull requests

3 participants