mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
dict.pop: Remove default for second argument (#7481)
The first overload takes care of the case where there is only one argument, so there should be no default in the second overload.
This commit is contained in:
@@ -911,7 +911,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
@overload
|
||||
def pop(self, __key: _KT) -> _VT: ...
|
||||
@overload
|
||||
def pop(self, __key: _KT, __default: _VT | _T = ...) -> _VT | _T: ...
|
||||
def pop(self, __key: _KT, __default: _VT | _T) -> _VT | _T: ...
|
||||
def __len__(self) -> int: ...
|
||||
def __getitem__(self, __k: _KT) -> _VT: ...
|
||||
def __setitem__(self, __k: _KT, __v: _VT) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user