Skip to content

Clarify our intent to support PEP 646 Unpack in type checking, not just grammar #2198

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 4 commits into from
Dec 18, 2021

Conversation

stroxler
Copy link
Contributor

@stroxler stroxler commented Dec 17, 2021

Thanks to Eric Traut for pointing out that we should be clearer
about our intent here and not just give a grammar snippet.

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.
@gvanrossum
Copy link
Member

Whoa. Let's wait merging this until we're done discussing the need to support Unpack[Ts] (see my post to typing-sig).

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.
@stroxler stroxler changed the title Clarify our intent to support PEP 646 Unpack, and intended statics Clarify our intent to support PEP 646 Unpack in type checking, not just grammar Dec 18, 2021
@stroxler
Copy link
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 Unpack[Ts] in arguments, which I agree probably isn't really needed.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One duplicate word. I'll just apply that fix and then land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants