Improve weakref.WeakValueDictionary.__init__ (#7068)

This commit is contained in:
Alex Waygood
2022-01-28 11:35:26 +00:00
committed by GitHub
parent 6746e83f52
commit 390634b96b

View File

@@ -32,7 +32,11 @@ class WeakValueDictionary(MutableMapping[_KT, _VT]):
@overload
def __init__(self) -> None: ...
@overload
def __init__(self, __other: Mapping[_KT, _VT] | Iterable[tuple[_KT, _VT]], **kwargs: _VT) -> None: ...
def __init__(self: WeakValueDictionary[_KT, _VT], __other: Mapping[_KT, _VT] | Iterable[tuple[_KT, _VT]]) -> None: ...
@overload
def __init__(
self: WeakValueDictionary[str, _VT], __other: Mapping[str, _VT] | Iterable[tuple[str, _VT]] = ..., **kwargs: _VT
) -> None: ...
def __len__(self) -> int: ...
def __getitem__(self, k: _KT) -> _VT: ...
def __setitem__(self, k: _KT, v: _VT) -> None: ...