collections.ChainMap.__missing__ is defined in typeshed here:
|
def __missing__(self, __key: _KT) -> _VT: ... |
But, at runtime, it always raises KeyError (and always has done), so there's no situation in which it would be safe to call this method (it's really just an implementation detail to give ChainMap a nicer error message for when the key isn't present in any of the underlying mappings, as far as I can tell).
The method was added to typeshed in a standalone PR (#4784)... Am I __missing__ something? Is there a good reason for it to be there?
collections.ChainMap.__missing__is defined in typeshed here:typeshed/stdlib/collections/__init__.pyi
Line 329 in 63489c3
But, at runtime, it always raises
KeyError(and always has done), so there's no situation in which it would be safe to call this method (it's really just an implementation detail to giveChainMapa nicer error message for when the key isn't present in any of the underlying mappings, as far as I can tell).The method was added to typeshed in a standalone PR (#4784)... Am I
__missing__something? Is there a good reason for it to be there?