Closed as not planned
Description
Mapping should be covariant. See discussion at #1113.
Note that the key type is used as an argument type to __getitem__
and get
, so mypy may complain about a covariant key type variable, but we can just ignore that error in the stub, as covariance is safe in this case. Mapping
doesn't support mutation operations and __getitem__
can fail even in fully type safe code.