-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
typing docs: Move some classes out of the "Generics" section #104707
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
Conversation
- 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 python#104642, but I think this change is independently an improvement.
(Note these were all in a section that starts with "These are not used in annotations. They are building blocks for creating generic types.") |
@AlexWaygood could you review this one so it doesn't accumulate merge conflicts? Thanks! |
Should we backport this to 3.11? The changes are an improvement on their own, I think, and backporting could help reduce the risk of future merge conflicts. |
Thanks @JelleZijlstra for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, @JelleZijlstra, I could not cleanly backport this to |
GH-104721 is a backport of this pull request to the 3.11 branch. |
…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>
…H-104707) (#104721) - 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. (cherry picked from commit ab71acd) --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
to generics. It makes more sense with other building blocks like Required.
Also fix the indentation for two notes associated with Concatenate.
Split off from #104642, but I think this change is independently an
improvement.
📚 Documentation preview 📚: https://cpython-previews--104707.org.readthedocs.build/