Feature or enhancement
Proposal:
# typical forms
class A[T: int, *Ts: int, **P: [int]]: ...
A[
str, # error
int, # ok, matching Ts bound
str, # error, not matching Ts bound
[str], # error, not matching P bound
]
A[
int, # ok
int, # ok, matching Ts bound
bool, # ok, matching Ts bound
[int], # ok, matching P bound
]
# tvt unpacked form
class B[*Ts: *tuple[int, str]]: ...
B[
int, # ok
int, # error, not subtype of str
int, # error, too many types
]
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/parameter-specification-and-type-variable-tuple-should-support-bounds/107068/6
Linked PRs
Feature or enhancement
Proposal:
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/parameter-specification-and-type-variable-tuple-should-support-bounds/107068/6
Linked PRs