Skip to content

How to parameterize a TypeVar by another TypeVar #1640

Answered by dmoisset
eike-fokken asked this question in Q&A
Discussion options

You must be logged in to vote

At least in that example, you don't need the second typevar

You could write:

def get_some_value(container: IndexibleProtocol[ValueType]) -> ValueType:
    return container[0]

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@eike-fokken
Comment options

Answer selected by eike-fokken
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants