Skip to content

[3.11] typing docs: Move some classes out of the "Generics" section (GH-104707) #104721

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

Merged
merged 2 commits into from
May 21, 2023

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented May 21, 2023

  • AnyStr can be used in type annotations, contrary to the section header
  • Unpack can also be used in annotations, and its use is not restricted to generics. It makes more sense with other building blocks like Required.
  • Protocol is not necessarily generic.

Also fix the indentation for two notes associated with Concatenate.

Split off from GH-104642, but I think this change is independently an improvement..
(cherry picked from commit ab71acd)


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

…ythonGH-104707)

- AnyStr can be used in type annotations, contrary to the section header
- Unpack can also be used in annotations, and its use is not restricted
  to generics. It makes more sense with other building blocks like Required.
- Protocol is not necessarily generic.

Also fix the indentation for two notes associated with Concatenate.

Split off from pythonGH-104642, but I think this change is independently an
improvement..
(cherry picked from commit ab71acd)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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 skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants