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

sort out variadic and unknown/projected *Tss and **Ps #855

Open
KotlinIsland opened this issue Jan 4, 2025 · 0 comments
Open

sort out variadic and unknown/projected *Tss and **Ps #855

KotlinIsland opened this issue Jan 4, 2025 · 0 comments

Comments

@KotlinIsland
Copy link
Owner

KotlinIsland commented Jan 4, 2025

class A[*Ts]: ...
class B[**P]: ...

# unknown/projected - currently impossible
unknown_a: A[...]  
unknown_b: B[...]
# `...` will now mean unknown, not Any

# variadic - currently disgusting A[*tuple[int, ...]]
variadic_a: A[*int]  # ideal, but is a TypeError at runtime
variadic_b: A[*int]  # ideal, but is a TypeError at runtime

variadic_a: A[Unpack[int]]
variadic_b: B[Unpack[int]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant