Clarify our intent to support PEP 646 Unpack in type checking, not just grammar#2198
Merged
gvanrossum merged 4 commits intopython:mainfrom Dec 18, 2021
Merged
Conversation
Thanks to Eric Traut for pointing out that we should specifically address supporting Unpack and the statics, as well as the grammar changes that we will need.
JelleZijlstra
approved these changes
Dec 17, 2021
Member
|
Whoa. Let's wait merging this until we're done discussing the need to support Also, what does "the statics" refer to? (I do agree that it's nice to show the syntax changes needed for PEP 646.) |
Leave in the discussion of how `(int, *Ts) -> bool` is equivalent to various Callable constructions, but remove the requirement to support an explicit `Unpack[Ts]`. Supporting `Unpack` in new syntax shouldn't be necessary since the new callable syntax will ship with support for the new star syntax, so there's no need for having a solution on earlier python versions.
Contributor
Author
|
By "the statics" I meant the expected behavior of type checkers (that is, the semantics for correct static analysis). I changed the wording to make that clearer, and took out the part about expecting type checkers to support |
gvanrossum
approved these changes
Dec 18, 2021
Member
gvanrossum
left a comment
There was a problem hiding this comment.
One duplicate word. I'll just apply that fix and then land.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks to Eric Traut for pointing out that we should be clearer
about our intent here and not just give a grammar snippet.