Allow using Unpack with arbritary bounded TypeVars #1897
Unanswered
PythonCoderAS
asked this question in
Q&A
Replies: 1 comment
-
There’s an open feature request for just this: #1399 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to make a class where the values of
kwargs
are specified through a TypeVar, something like this:Unfortunately, there seems to be no way to do this, firstly because TypedDict is not a valid bound type, and second because Unpack will not take TypeVars.
I'm thinking that maybe we could make it so that TypedDict can be a proper bound, or an equivalent bound type that will make Unpack happy.
Beta Was this translation helpful? Give feedback.
All reactions