Skip to content

Controlling Variance with PEP 695 Syntax #8433

Answered by erictraut
max-muoto asked this question in Q&A
Discussion options

You must be logged in to vote

In your example, the you are defining two symbols K in two different scopes. They have no relation to each other.

When you define a class, you need to either use PEP 695 syntax or traditional TypeVars. You cannot combine the two. The PEP is very clear on this.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@max-muoto
Comment options

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