Skip to content
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

--py311-plus: G[Unpack[T]] => G[*T] #744

Closed
asottile opened this issue Oct 29, 2022 · 3 comments · Fixed by #745
Closed

--py311-plus: G[Unpack[T]] => G[*T] #744

asottile opened this issue Oct 29, 2022 · 3 comments · Fixed by #745

Comments

@asottile
Copy link
Owner

part of https://peps.python.org/pep-0646/

@MarcoGorelli
Copy link
Contributor

I could give this a go, just a bit confused from reading the PEP:

# Unpacking using ``Unpack`` in older versions of Python
class Array(Generic[Unpack[Shape]]): ...

How does one access "Unpack" in older versions? from typing import Unpack only seems to work in python 3.11.

@asottile
Copy link
Owner Author

typing_extensions has an Unpack -- @tusharsadhwani might also be working on this one too

@tusharsadhwani
Copy link
Contributor

I'm working on it :D

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

Successfully merging a pull request may close this issue.

3 participants