Open JukkaL opened 2 months ago
this mostly impacts users of older Python versions
Is there a reason that this is expected to be mostly relevant for users of older Python versions? It seems to me to be a very useful addition when implemented. Variance almost always needs to be specified according to the inference rules anyway (and you might need both _co
and _contra
variants of a type variable instead of only one).
@jonaslb because in Python 3.12 and newer, you can use the native generic syntax, which always implicitly infers variance.
Feature
See this section of PEP for details.
Pitch
This is probably the most significant omission from full PEP 695 support (though this mostly impacts users of older Python versions).