Open iutlu opened 4 months ago
Sorry, returning to this after some reading; I think I must have gotten my thoughts crossed between the very early discussions (https://github.com/python/typing/issues/445) about making Mapping
itself covariant in its key (for which there's nothing to be done), and the later discussions about offering Mapping
supertypes that do not define __getitem__
/ get
, etc. I originally linked to, which could be relevant for this repo.
Apologies for the imprecise initial post!
Is a possible implementation of a Mapping-like type that is covariant in the key as discussed here being considered?
Specifically, a mapping type whose
__getitem__
has a key typedobject
.The linked thread was referring to this package, so I'd thought I'd ask here. Thanks!